%T is temp from 0 to 50 in increments of 5.
T = 0:5:50;
R1=100;
R2=1000;
R3=1000;
Rm=10000;
Vi=10;
Ru = 1000*exp(3675*((1./T+273)-0.003354));
Vm = (Vi*Rm*(Ru*R2-R1*R3))/(Ru*R3*(R1+R2)+R1*R2*(Ru+R3)+Rm*(Ru+R3)*(R1+R2));
plot(T,Vm);

 Akzeptierte Antwort

Voss
Voss am 28 Apr. 2022

0 Stimmen

Use element-wise division (./) in the expression for Vm. Also, it looks like the expression for Ru should have 1./(T+273) rather than 1./T+273. Other problems may exist, but now you get a vector of finite numbers:
%T is temp from 0 to 50 in increments of 5.
T = 0:5:50;
R1=100;
R2=1000;
R3=1000;
Rm=10000;
Vi=10;
% Ru = 1000*exp(3675*((1./T+273)-0.003354));
% Vm = (Vi*Rm*(Ru*R2-R1*R3))/(Ru*R3*(R1+R2)+R1*R2*(Ru+R3)+Rm*(Ru+R3)*(R1+R2))
Ru = 1000*exp(3675*((1./(T+273))-0.003354));
Vm = (Vi*Rm*(Ru*R2-R1*R3))./(Ru*R3*(R1+R2)+R1*R2*(Ru+R3)+Rm*(Ru+R3)*(R1+R2))
Vm = 1×11
6.1391 5.7284 5.2867 4.8237 4.3501 3.8769 3.4144 2.9715 2.5547 2.1687 1.8161
plot(T,Vm);

2 Kommentare

Karl Kadva
Karl Kadva am 28 Apr. 2022
Thank you!
Voss
Voss am 28 Apr. 2022
You're welcome!

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Instrument Control Toolbox finden Sie in Hilfe-Center und File Exchange

Gefragt:

am 28 Apr. 2022

Kommentiert:

am 28 Apr. 2022

Community Treasure Hunt

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

Start Hunting!

Translated by