contour plot problem Z must be at least a 2x2 matrix
33 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Jialin Men
am 25 Jul. 2024 um 16:18
Kommentiert: Star Strider
am 25 Jul. 2024 um 21:25
Hallo everyone,
i have a problem to make the contour plot, it always shows Z must be at least a 2x2 matrix. i have try my best to solve, but it still not work, could you please to help me? The code is as follows.
x=[80;100;90;90;90]
y=[4;4;2;6;4]
[X,Y] = meshgrid(x,y)
% Polly 11 f(x,y)=p00+p10*x+p01*y
f1=1.7419-0.0006*x+0.0132*y
contour(X,Y,f1)
Thanks and best regards
JL
0 Kommentare
Akzeptierte Antwort
Star Strider
am 25 Jul. 2024 um 16:34
x=[80;100;90;90;90]
y=[4;4;2;6;4]
[X,Y] = meshgrid(x,y);
% Polly 11 f(x,y)=p00+p10*x+p01*y
f1=1.7419-0.0006*x+0.0132*y
Fz = scatteredInterpolant(x, y, f1)
F1 = Fz(X,Y)
contour(X,Y,F1)
.
4 Kommentare
Star Strider
am 25 Jul. 2024 um 21:25
As always, my pleasure!
I will gladly help you with any further questions.
Weitere Antworten (1)
Walter Roberson
am 25 Jul. 2024 um 16:27
x=[80;100;90;90;90];
y=[4;4;2;6;4];
[X,Y] = meshgrid(x,y);
% Polly 11 f(x,y)=p00+p10*x+p01*y
f1=1.7419-0.0006*X+0.0132*Y;
contour(X,Y,f1)
4 Kommentare
Walter Roberson
am 25 Jul. 2024 um 16:57
Your plot is similar to what you would get if you used surfc
Siehe auch
Kategorien
Mehr zu Contour Plots finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!