Variables interact each other in different equations.
조회 수: 1 (최근 30일)
이전 댓글 표시
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
댓글 수: 0
답변 (1개)
Shubham Khatri
2021년 2월 5일
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.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Scope Variables and Generate Names에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!