Filter löschen
Filter löschen

Variables interact each other in different equations.

1 Ansicht (letzte 30 Tage)
Ikjoo Hwang
Ikjoo Hwang am 6 Mai 2020
Beantwortet: Shubham Khatri am 5 Feb. 2021
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

Antworten (1)

Shubham Khatri
Shubham Khatri am 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.

Kategorien

Mehr zu Scope Variables and Generate Names finden Sie in Help Center und File Exchange

Produkte


Version

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by