Need help plotting one function against a variable without it using the mean value of the first variable?

1 Ansicht (letzte 30 Tage)
The following is my code so far. I'm trying to plot T against V, which is in the denominator of the equation for T as well as being in a square root in the numerator. When I run this code, it just plots T and v using v=7.5 and it just gives a striahgt line (T is only calculated for v=7.5). How do I get T to vary with v as it should?
v=0:0.1:15;
P=15*10^6;
a=(0.027138*10^-9);mew=0.15;n=(2.2*10^11);L1=P/n;
h=(mew*L1*v)/(pi*(a^2));rho=8000;C=500;Kd=16.3;Kp=300;
Pc=(v*a*rho*C)/(2*Kd);
T=(13.176*a*h)/(46.848*Kp+9*pi*Kd*sqrt(pi*(0.874+Pc)))
plot(v,T)

Akzeptierte Antwort

Dishant Arora
Dishant Arora am 16 Mär. 2014
use dot operator ./
T=(13.176*a*h)./(46.848*Kp+9*pi*Kd*sqrt(pi*(0.874+Pc)))

Weitere Antworten (0)

Kategorien

Mehr zu 2-D and 3-D Plots finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by