How can I use arrayfun and integral as anonymous function?
6 views (last 30 days)
fun1=@(s,t) s .* exp(-s).* ( (t-s) .^(v-1) ) ;
%gex= @(t) arrayfun(@(t) integral (@(s) fun1(s,t) ,0,t), t);
gex= @(t) 0;
gex= @(t) arrayfun(@(t) integral (@(s) fun1(s,t) ,0,t), t);
How do I exclude input
and make it into a new value inside the matrix namely, gex, i.e, gives
as one matrix and set the value of
in same time?
David Hill on 10 Jun 2021
I am doing a little guessing. I assume you want to integrate with respect to s (0,t) then look at t from 0:0.1:1.
syms s t
More Answers (1)
Kapil Gupta on 10 Jun 2021
I assume you want to know how you can use integral function as anonymous function. The following MATLAB Answers link has a similar query, you can check this out: