필터 지우기
필터 지우기

input arguments must be double?help

조회 수: 3 (최근 30일)
khushi
khushi 2015년 8월 26일
답변: Steven Lord 2015년 8월 26일
clc;clear all;
g_db=[0:1:10];
g=10.^(g_db/10);
%g=0:1:3;
c=1;
alpha=2;
syms y
a=sqrt(2.*(g).*(1-sqrt(1/2)));
b=sqrt(2.*(g).*(1+sqrt(1/2)));
m=exp(-0.5*(a.^2+b.^2).*y);
r=marcumq((a.*sqrt(y)),(b.*sqrt(y)),1);
x=((y.^(alpha-1)).*exp(-y./c))/((gamma(alpha))*(c^alpha));
q=(m.*r);
t=0.5*besseli(0,a.*b.*y).*m;
s=(q-t).*x;
P=int(s,y,0,100)
semilogy(g_db,P,'o')
hold on

답변 (1개)

Steven Lord
Steven Lord 2015년 8월 26일
First, please format your code and display one command per line, to make it easier to read and recognize where one statement ends and another begins.
Second, give the FULL text of the error message and indicate (through a comment) the exact line of code on which you receive that error.
Third, I don't believe that the MARCUMQ functions from either Signal Processing Toolbox or Communications System Toolbox support symbolic input arguments. You will need to create a function that evaluates your integrand numerically and use that function with INTEGRAL not INT.

태그

Community Treasure Hunt

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

Start Hunting!

Translated by