I am typing some code for a class but every time I run the function I get the same error:
??? Error using ==> plus Matrix dimensions must agree. Error in ==&
How do you expect -x2.^2-y1.^2 to work when x2 and y1 is of different size? x2=0:0.1:5 has fifty or so entires while y1=-5:0.1:5 has a hundred or so entries.
-x2.^2-y1.^2
x2
y1
x2=0:0.1:5
y1=-5:0.1:5