Why the Surf function is not working?
13 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
chaos B
am 15 Jan. 2020
Kommentiert: chaos B
am 15 Jan. 2020
I have this function i am trying to plot but its not working. In fact, every time i try to use ' surf ' it does not work... i get the same error.
this is a code example
[x,y] = meshgrid(-2:.2:2);
g = x .* exp(-x.^2 - y.^2);
surf(x, y, g)
and this is the error i get every time i try to graph 3d using surf
Undefined function or variable 'xerror'.
Error in surf (line 71)
xerror(surfchk(dataargs{:}));
This is line 71 in surf : xerror(surfchk(dataargs{:}));
Any ideas anyone?
0 Kommentare
Akzeptierte Antwort
Walter Roberson
am 15 Jan. 2020
At some point you had the code for surf open and accidentally inserted a character into the code. You need to go back and delete the x from that line of code.
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Surface and Mesh Plots finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!