Azzera filtri
Azzera filtri

Variables interact each other in different equations.

1 visualizzazione (ultimi 30 giorni)
If I want to solve two equations which use each result as a variable of each equations?
Trying to insult equation into other, but still cannot recognize as a setting value.
clear; clc; close all
TI = 30;
A1 = 0.200*1000;
E1 = 20; L2 = 360;
L1 = 1050;
C1 = 0.1;
k1 = 0.33;
myu1 = 0.1;
theta1 = 1.5;
theta2 = 1.0;
W1 = 1400; W2 = W1;
V3 = 1300;
t_n = 10 ;
t = 0:0.01:1 * t_n
V1 = W1 - (1-k1*(1-exp(-myu1*theta1)))*TI/C1 + T1/C1; % T1 Value is calculated from below equation
V2 = W2 - (1-k1*(1-exp(-myu1*theta2)))*T1/C1 + T2/C1; % T1, T2 Value is calculated from below equation
T1 = (TI.*V1 - exp(-(V2*t)/L1).*(TI.*V1 - A1*E1*V1 + A1*E1*V2) - A1*E1*V1 + A1*E1*V2)/V2; % V1, V2 Value is calculated from above equation
T2 = (T1.*V2 - exp(-(V3*t)/L2).*(T1.*V2 - A1*E1*V2 + A1*E1*V3) - A1*E1*V2 + A1*E1*V3)/V3; % V2 Value is calculated from above equation
plot(t, T1,'red')
hold on
plot(t, T2, 'Blue')
hold off

Risposte (1)

Shubham Khatri
Shubham Khatri il 5 Feb 2021
Hello,
To my understanding, you can set an initial values to the variables and then you can run the program in loop with approximation functions to get the results.
Hope it helps.

Categorie

Scopri di più su Scope Variables and Generate Names in Help Center e File Exchange

Prodotti


Release

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by