Error using plot, Data must be a single input
30 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
x211 = linspace(-5,5,100);
x221 = linspace(-5,5,100);
f22 = 100*(x221-x211.^2).^2 + (1-x211).^2;
plot(x211,x221,f22);
hold on;
plot(S_space(:,2),S_space(:,3),S_space(:,4),'ro-')
% If I use above partial code, then
% Error using plot. Data must be a single input of y-values or one or more pairs of x- and y-values.
0 Commenti
Risposta accettata
MJFcoNaN
il 23 Apr 2022
For 3D data, you should use plot3
x211 = linspace(-5,5,100);
x221 = linspace(-5,5,100);
f22 = 100*(x221-x211.^2).^2 + (1-x211).^2;
plot3(x211,x221,f22);
0 Commenti
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Line Plots in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!