Integration of an Anonymous Function with Multiplee Parameters wrt One Variable

조회 수: 1 (최근 30일)
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.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Programming에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by