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

1 visualización (últimos 30 días)
farid p
farid p el 5 de Jul. de 2021
Comentada: farid p el 5 de Jul. de 2021
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 comentario
farid p
farid p el 5 de Jul. de 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

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Thermal Analysis en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by