Integration a multivariable function wrt to just 1
1 view (last 30 days)
Show older comments
Hi guys,
I'm trying to integrate a function that consists of 3 variables, i,j, and y, wrt to y.
This is what I have came up with. It doesn't work in the sense that after the integration, if I try to input values for i and j, there is an error.
fun_wing = @(y,i,j) rho.*A.*((((y./l).^(i+1)).*(2+i-i.*(y./l)))./(i.*(i+1).*(i+2))).*((((y./l).^(j+1)).*(2+j-j.*(y./l)))./(j.*(j+1).*(j+2)));
M_wing = @(i,j) integral(@(y) fun_wing(y,i,j),0,1);
rho is a value that I have defined, and A is a function in terms of y, as follows.
A = @(y) 0.05.*(4-2.*y./l+((y.*y)./(l.*l)));
Please advice!
Thanks in advance.
Cheers, Jason
0 Comments
Accepted Answer
Walter Roberson
on 30 Sep 2015
You define A as an anonymous function, but in fun_wing you attempt to multiply the handle of the function by something. You need to invoke the function, A(y) instead of just the name A
More Answers (0)
See Also
Categories
Find more on Digital Filter Analysis in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!