%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);

 Réponse acceptée

Voss
Voss le 28 Avr 2022
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 commentaires

Karl Kadva
Karl Kadva le 28 Avr 2022
Thank you!
Voss
Voss le 28 Avr 2022
You're welcome!

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Instrument Control Toolbox dans Centre d'aide et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by