plotting 3d of output

1 次查看(过去 30 天)
hi all,
according to this code i would like to plot my output(qult)versus these values CS,WS,F .IS there anyway,please help me/
code :
B=1000;L=2000;Df=200;Sc=1.1;Sq=1.1;Sgama=.8;dgama=1;dc=1.08;
nsamples=10000;
for i=1:nsamples
CS=C(1,i);
WS=G(1,i);
F=fi(1,i);
Nq=tan((pi/4)+(pi*F/360))*tan((pi/4)+(pi*F/360))*2.718^(pi*tan(F*pi/180));
Nc=(Nq-1)*cot(F*pi/180);
Ngama=2*(Nq+1)*tan(F*pi/180);
dq=1+(0.4)*(tan(F*pi/180))*(1-sin(F*pi/180))^2;
qult(i)=(CS*Nc*Sc*dc)+(384*Nq*Sq*dq)+(980*Ngama*Sgama*dgama);
end
qult is a function of those 3variables CS,WS,F.

采纳的回答

Walter Roberson
Walter Roberson 2011-7-12
Sorry, 3 dimensions is the maximum for plotting, but you have four dimensions. You would have to represent one of your dimensions as color or transparency or point-size or point-shape. scatter3() is your best bet.
  2 个评论
milad babaei
milad babaei 2011-7-12
thank you for your help,would you please explain me more on using scatter3 command.?//
Walter Roberson
Walter Roberson 2011-7-12
pointsize = 8;
scatter3(CS, WS, F, pointsize, qult)
This would create an sphere at each CS(i), WS(i), F(i) location, with the sphere being colored according to the value of qult(i)

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Surface and Mesh Plots 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by