MATLAB: V_n=R*T/P

underfined variable

Why does this error message keep coming up when I enter this equation in the command window? >> V_n=R*T/P; %find values of V_n R=0.08602; P=1.01; T=285;2;325; Undefined function or variable 'R'.

Best Answer

Yo something is wrong with this line.
T=285;2;325; or T=285:2:325;
The following works for me, Code 1:
R=0.08602;
P=1.01;
T=285;2;325
V_n=R*T/P
answer V_n = 24.2730;
Code2:
R=0.08602;
P=1.01;
T=285:2:325
V_n=R*T./P
answer: V_n is an array of length 21.
Code3:
R=0.08602;
P=1.01;
T=[285;2;325];
V_n=R*T./P
answer: V_n =
24.2730
0.1703
27.6797
What do you want to do exactly?
Related Question