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

1 view (last 30 days)
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 Comment
farid p
farid p on 5 Jul 2021
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

Sign in to comment.

Answers (0)

Categories

Find more on Thermal Analysis in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!