Plotting the results of 3equation and 3 variables...

조회 수: 1 (최근 30일)
farid p
farid p 2021년 7월 5일
댓글: farid p 2021년 7월 5일
clc
clear all
close all
for x=1:1000:50000
syms Rab Rca Rbc
a = 1;
b = 5.45*(10^4);
y_gam11(x) = gamcdf(x,a,b);
y_gam1(x)=1-y_gam11(x);
a = 0.01*7.06;
b = 1.2*5.45*(10^4);
y_gam22(x) = gamcdf(x,a,b);
y_gam2(x)=1-y_gam22(x);
a = 0.075*7.06;
b = 1.5*5.45*(10^4);
y_gam33(x) = gamcdf(x,a,b);
y_gam3(x)=1-y_gam33(x);
gammaab(x)=y_gam1(x).*y_gam2(x);
gammabc(x)=y_gam2(x).*y_gam3(x);
gammaca(x)=y_gam3(x).*y_gam1(x);
eq1(x)=( 1-( (1-Rab)*(1-(Rca*Rbc)) ) )==gammaab(x);
eq2(x)=( 1-( (1-Rbc)*(1-(Rab*Rca)) ) )==gammabc(x);
eq3(x)=( 1-( (1-Rca)*(1-(Rab*Rbc)) ) )==gammaca(x);
sol=solve([eq1(x),eq2(x),eq3(x)], [Rab, Rbc, Rca]);
if Rab>0 && Rab<1
RabSol{x} = sol.Rab;
end
if Rbc>0 && Rbc<1
RbcSol{x} = sol.Rbc;
end
if Rca>0 && Rca<1
RcaSol{x} = sol.Rca;
end
end
plot(x,RabSol)
plot(x,RbcSol)
plot(x,RcaSol)
  댓글 수: 1
farid p
farid p 2021년 7월 5일
I am trying to solve the three equation-three variables involving a varibale (x) . Then I'm gonna store the results between 0 and 1 to plot them.
thx

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Thermal Analysis에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by