Integration of an Anonymous Function with Multiplee Parameters wrt One Variable

1 vue (au cours des 30 derniers jours)
Sean Raffetto
Sean Raffetto le 10 Fév 2016
Dear All,
I am having trouble integrating a function which depends on a parameter of an integral like:
int = @(x,Rad,K) (1+0.25.*sin((P/5).*x.*sin(Rad)).*exp(-1i.*2.*x.*cos(Rad).*K'));
%where P is pi to a certain number of digits, Rad is a 721x1 vector of angles in radians from 0 to 6.28 in steps of 0.0087, K is a vector of 37x1 ranging from 2.9342 to 4.3979 in steps of 0.0406.
x is my variable of integration from -6.096 to 6.096. I want q to output a 721x37 matrix, but my integral isn't working correctly:
q = integral(@(Rad,K)int@(x),-L/2,L/2,'ArrayValued',true);
What do I need to change/what do I need to add so my integral/function gives me my 721x37 matrix???
Thanks.

Réponses (0)

Catégories

En savoir plus sur MATLAB dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by