Solving PDEs: Number of rows required in output of user defined coefficient functions
Mostrar comentarios más antiguos
Hello, I am trying to solve an inhomogenous wave equation using a script (not PDETool) and the hyperbolic PDE solver. My coefficients are quite complicated so I am writing my own functions to describe them. I understand that the coefficient array the function outputs must have as many columns as mesh elements, but what about the number of rows? I currently only have one row but I get errors from 'pdeasma' indicating that matrix dimensions must agree. When I give the coefficient a single scalar value it's fine, so I am confident the error has to do with my coefficient function. My coefficients are only dependent on position in the mesh (not time or initial conditions). Thanks a lot!
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre General PDEs en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!