Variables interact each other in different equations.

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

답변 (1개)

Shubham Khatri
Shubham Khatri 2021년 2월 5일

0 개 추천

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.

카테고리

도움말 센터File Exchange에서 Mathematics에 대해 자세히 알아보기

제품

릴리스

R2019b

질문:

2020년 5월 6일

답변:

2021년 2월 5일

Community Treasure Hunt

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

Start Hunting!

Translated by