Info

此问题已关闭。 请重新打开它进行编辑或回答。

Please help me to fix this code. I have 3 sets of data, radius,CA, CPTOT, iam trying to plot contours of CPTOT w.r.t radius and CA along x-axis and y-axis. I have attached txt file for reading y and z values.

1 次查看(过去 30 天)
load new.txt;
x= linspace(24.94,27.30,264);
>> xmin = min(x(:));
>> xmax = max(x(:));
>> y = a(:,1);
>> z = a(:,2);
>> ymin = min(y(:));
>> ymax = max(y(:));
zmin = min(z(:))
zmax = max(z(:));
ini = 24.94;
last = 27.3;
samples = 264;
>> k=(last-ini)/(samples-1);
[xi,yi]=meshgrid(0:k:xmax,0:k:ymax);
>> zi=griddata(x,y,z,xi,yi);
contour(zi)

回答(0 个)

此问题已关闭。

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by