I am unable to plot this mat lab program

My Program included the triple integral:
clearvars; close all; clc;
Bi=[0.001 0.1:0.1:0.9 0.999];N0=0.01;n=0.7;Rth=1;
Omg_sr=1;Omg_rd=1;p1=5;p=10^(0.1*p1);N=3;
sop_th=zeros(1,length(Bi));
for a=1:length(Bi)
b=Bi(a);
k1=(1-b)*p;k2=N0/(k1*Omg_sr);k3=n*b*(1-b)*p;k4=n*b*N0;k5=(1-b)*N0;
fun=@(z,y,x) ((((k4*x+k5)./(k3*x)).*(exp(-(((y./z).*((k4*x+k5)./(k3*x)))+x/Omg_sr)))).*(N*((1-exp(-((z*k2)./(z+1)))).^(N-1)).*(exp(-k2*z)).*((k2./(z+1))+(1./(z+1).^2))));
zmin=0;zmax=Inf;
ymin=0;ymax=@(z)(2^Rth*(1+z)-1);
xmin=0;xmax=100;
sop_th(a)=(integral3(fun, zmin,zmax,ymin,ymax,xmin,xmax))^N;
end
semilogy(Bi,sop_th,'r>-');
grid on;hold on;
If any mistake in my program please help me.

댓글 수: 6

In first factor of ((k4*x+k5)./(k3*x)), if I rempve the term './(k3*x)', then it is integrated. Otherwise, it creates the problem. In this, variables are x,y and z.
Michal Dobai
Michal Dobai 2017년 12월 13일
Format your code first, please.
Shashibhushan Sharma
Shashibhushan Sharma 2017년 12월 13일
편집: Walter Roberson 2017년 12월 14일
clearvars; close all; clc;
Bi=[0.001 0.1:0.1:0.9 0.999];N0=0.01;n=0.7;Rth=1; Omg_sr=1;Omg_rd=1;p1=5;p=10^(0.1*p1);N=3;
sop_th=zeros(1,length(Bi));
for a=1:length(Bi)
b=Bi(a);
k1=(1-b)*p;k2=N0/(k1*Omg_sr);k3=n*b*(1-b)*p;k4=n*b*N0;k5=(1-b)*N0;
fun=@(z,y,x) ((((k4*x+k5)./(k3*x)).*(exp(-(((y./z).*
((k4*x+k5)./(k3*x)))+x/Omg_sr)))).*(N*((1-exp(-
((z*k2)./(z+1)))).^(N-1)).*(exp(-k2*z)).*((k2./(z+1))+(1./(z+1).^2))));
zmin=0;zmax=Inf;
ymin=0;ymax=@(z)(2^Rth*(1+z)-1);
xmin=0;xmax=1000;
sop_th(a)=(integral3(fun, zmin,zmax,ymin,ymax,xmin,xmax))^N;
end
semilogy(Bi,sop_th,'r>-');
grid on;hold on;
fun=@(z,y,x) ((((k4*x+k5)./(k3*x)).*(exp(-(((y./z).* ((k4*x+k5)./(k3*x)))+x/Omg_sr)))).*(N*((1-exp(-((z*k2)./(z+1)))).^(N-1)).*(exp(-k2*z)).*((k2./(z+1))+(1./(z+1).^2))));
this is in one line
In first factor of ((k4*x+k5)./(k3*x)), if I remove the term './(k3*x)', then it is integrated. Otherwise, it creates the problem. In this, variables are x,y and z.
No one give me suggestion. So, I feel that this triple integration will not solve.

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

답변 (0개)

카테고리

도움말 센터File Exchange에서 MATLAB에 대해 자세히 알아보기

제품

질문:

2017년 12월 13일

편집:

2017년 12월 14일

Community Treasure Hunt

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

Start Hunting!

Translated by