Why is my graph coming out blank when i try and plot this code?
3 views (last 30 days)
Brian Hart on 23 Feb 2019
It's an error in your calcuation of y. Check the size and you'll see it's coming out as a scalar. Replace "/" with "./", since you want element-wise division.
Star Strider on 23 Feb 2019
Because you are calculating a single point.
If you use element-wise division here (using ./ rather than /), you get the plot you expect:
See the documentation on Array vs. Matrix Operations (link) for an extended discussion.