Matlab - symsum with itegral
2 ビュー (過去 30 日間)
古いコメントを表示
Hello,
I am trying to calculate the following:
I am using the following code:
clear all;
close all
clc;
SNR0dB = 40;
SNR0 = 10 ^ (SNR0dB / 10);
LaserIntensity = 1877;
EffNoisePower = 4;
tmp_sigma = 20;
m=1;
rho=0.5;
H=1;
load coeffs
C = sqrt(SNR0*EffNoisePower) / LaserIntensity;
Zn_1 = inf;
Zn = C / 0.204;
syms k x
S1 = symsum(( ((rho*m)/(H^2*(1-rho^2)))^(m+2*k-1) ) * (1/(factorial(k)*gamma(m+k))) * integral(@(r1) r1.^(2*m+2*k+1).*exp((-r1.^2.*m)/(H^2*(1-rho^2))),Zn,Zn_1), k, 0, 10)
I get the following error:
Error using integralCalc/finalInputChecks (line 511)
Input function must return 'double' or 'single' values. Found 'sym'.
Error in integralCalc/iterateScalarValued (line 315)
finalInputChecks(x,fx);
Error in integralCalc/vadapt (line 132)
[q,errbnd] = iterateScalarValued(u,tinterval,pathlen);
Error in integralCalc (line 83)
[q,errbnd] = vadapt(@AToInfInvTransform,interval);
Error in integral (line 88)
Q = integralCalc(fun,a,b,opstruct);
Error in SumOverIntegral (line 21)
S1 = symsum(( ((rho*m)/(H^2*(1-rho^2)))^(m+2*k-1) ) * (1/(factorial(k)*gamma(m+k))) * integral(@(r1)
r1.^(2*m+2*k+1).*exp((-r1.^2.*m)/(H^2*(1-rho^2))),Zn,Zn_1), k, 0, 10)
Can someone please help how to overcome the error of sending symbol to the integral function?
Thank you.
0 件のコメント
採用された回答
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Calculus についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!