How do I write this in to MatLab correctly? I always get Matrix dimensions must agree.

 Accepted Answer

Star Strider
Star Strider on 3 Mar 2020
Use element-wise operations as cescribed in Array vs. Matrix Operations, and create appropriate matrices from your x and y vectors with ndgrid or meshgrid. Use the resulting matrices in your equation, not vectors.

More Answers (0)

Categories

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!