variable returning to scalor

I am trying to plot "th" vs "Pi" . But "th" is coming as scalor only and gives a single value result. How to make th a vector? Below is the code.
clear all
Ro=0.05302
Ri=0.04826
t=400+273
nu = 1.81e-5
si = 32e-6
Po = [1e6,2e6]
Pi = 0
Pm = (Pi + Po)/2
dP = Po-Pi
dR = Ro- Ri
Rm = (Ro + Ri)/2
hc = si
B = sqrt(t)
Q = 3.14* Rm * hc*hc*hc* dP/(6 * nu * dR)
A = (3.14* Rm * hc*hc*hc* dP/(6 * nu * dR ))*sqrt(t) / Pm
th = A/(2* 3.14 * Rm)
plot(th,Po)

回答 (1 件)

KALYAN ACHARJYA
KALYAN ACHARJYA 2019 年 8 月 18 日
編集済み: KALYAN ACHARJYA 2019 年 8 月 18 日

0 投票

Ro=0.05302;
Ri=0.04826;
t=400+273;
nu = 1.81e-5;
si = 32e-6;
Po=[1e6,2e6];
Pi=0;
Pm=(Pi+Po)/2;
dP=Po-Pi;
dR = Ro- Ri;
Rm = (Ro + Ri)/2;
hc = si;
B = sqrt(t);
Q =(3.14* Rm*hc*hc*hc*dP)/(6*nu*dR);
A=((3.14*Rm*hc*hc*hc*dP)./(6*nu.*dR)).*sqrt(t)./Pm;
th=A./(2*3.14*Rm);
plot(th,Po);
56.png
Now the results are not scalars, though the y data is independent with x, check and reverify the equations, is the any dependency or not?

4 件のコメント

KALYAN ACHARJYA
KALYAN ACHARJYA 2019 年 8 月 18 日
編集済み: KALYAN ACHARJYA 2019 年 8 月 18 日
If it allowable in your case, introduce the step size so that you will get more vector length, like
Po=1e6:100:2e6;
Red
Red 2019 年 8 月 18 日
Thanks kalyan. It worked.
KALYAN ACHARJYA
KALYAN ACHARJYA 2019 年 8 月 18 日
My pleasure Red !
madhan ravi
madhan ravi 2019 年 8 月 18 日
Po=1e6,100:2e6;
% ^---- ?? : ?

この質問は閉じられています。

タグ

質問済み:

Red
2019 年 8 月 18 日

閉鎖済み:

2021 年 8 月 20 日

Community Treasure Hunt

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

Start Hunting!

Translated by