Info

Cette question est clôturée. Rouvrir pour modifier ou répondre.

variable returning to scalor

3 vues (au cours des 30 derniers jours)
Red
Red le 18 Août 2019
Clôturé : MATLAB Answer Bot le 20 Août 2021
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)

Réponses (1)

KALYAN ACHARJYA
KALYAN ACHARJYA le 18 Août 2019
Modifié(e) : KALYAN ACHARJYA le 18 Août 2019
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 commentaires
KALYAN ACHARJYA
KALYAN ACHARJYA le 18 Août 2019
My pleasure Red !
madhan ravi
madhan ravi le 18 Août 2019
Po=1e6,100:2e6;
% ^---- ?? : ?

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by