Friday, 15 June 2012

How to integrate this inline function in matlab -



How to integrate this inline function in matlab -

i want integrate function in terms of dx in matlab. there function it?

f = inline('(k/l)*((x/l)^k-1)*(exp(-1*((x/l)^k)))','x','l','k');

the inline function depreciated. should instead utilize anonymous functions. assuming k , l constants:

f = @(x) (k/l)*((x/l).^k-1).*(exp(-1*((x/l).^k)));

from there, there number of available numerical integration functions. start integral , work way down.

value = integral(@f,a,b);

matlab

No comments:

Post a Comment