フィルターのクリア

Variables interact each other in different equations.

1 回表示 (過去 30 日間)
Ikjoo Hwang
Ikjoo Hwang 2020 年 5 月 6 日
回答済み: Shubham Khatri 2021 年 2 月 5 日
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 日
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.

カテゴリ

Help Center および File ExchangeScope Variables and Generate Names についてさらに検索

製品


リリース

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by