フィルターのクリア

output in 3D format

3 ビュー (過去 30 日間)
milad babaei
milad babaei 2011 年 9 月 24 日
hi, according to this code i would like to plot my output(qult)versus these values CS,F .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 年 9 月 24 日
surf( C(1,1:nsamples), fi(1,1:nsamples), qult );
Note: for efficiency, before your loop, you should do
qult = zeros(1,nsamples);
  3 件のコメント
Walter Roberson
Walter Roberson 2011 年 9 月 25 日
Your posted code assumes that C and G and fi all exist before getting to that line. Only you know how those variables need to be initialized.
Walter Roberson
Walter Roberson 2011 年 9 月 25 日
UJJWAL had the good point that you should use plot3() instead of surf() for this situation.
But you still need to initialize C and G and fi.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeAnnotations についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by