input arguments must be double?help
3 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
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
0 Commenti
Risposte (1)
Steven Lord
il 26 Ago 2015
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.
0 Commenti
Vedere anche
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!