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

 Risposta accettata

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 Commenti

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

Accedi per commentare.

Più risposte (0)

Categorie

Scopri di più su Instrument Control Toolbox in Centro assistenza e File Exchange

Richiesto:

il 28 Apr 2022

Commentato:

il 28 Apr 2022

Community Treasure Hunt

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

Start Hunting!

Translated by