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)

Respuestas (1)

KALYAN ACHARJYA
KALYAN ACHARJYA el 18 de Ag. de 2019
Editada: KALYAN ACHARJYA el 18 de Ag. de 2019

0 votos

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 comentarios

KALYAN ACHARJYA
KALYAN ACHARJYA el 18 de Ag. de 2019
Editada: KALYAN ACHARJYA el 18 de Ag. de 2019
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 el 18 de Ag. de 2019
Thanks kalyan. It worked.
KALYAN ACHARJYA
KALYAN ACHARJYA el 18 de Ag. de 2019
My pleasure Red !
madhan ravi
madhan ravi el 18 de Ag. de 2019
Po=1e6,100:2e6;
% ^---- ?? : ?

La pregunta está cerrada.

Etiquetas

Preguntada:

Red
el 18 de Ag. de 2019

Cerrada:

el 20 de Ag. de 2021

Community Treasure Hunt

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

Start Hunting!

Translated by