Solving PDEs: Number of rows required in output of user defined coefficient functions
Show older comments
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!
Accepted Answer
More Answers (0)
Categories
Find more on General PDEs in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!