Iterating in function handles
1 次查看(过去 30 天)
显示 更早的评论

I need to input function handles, f and g, for the 'dt' and 'dw' components respectively. For example,
g = @(t, x) sig;
would define the function handle for g given a pre-defined array sig. Now, I would like to define the function handle
, where
are coefficients that depend on i and j. For the purpose of this example, assume that
. How can I define a single function handle that returns a column vector that does what I want?



If it helps, when
, I was able to do

f = @(t, x) mean(x) - x;
But I'm stuck on how to adapt this to include the
. I think I need to iterate over i and j inside the function, but don't know if this is correct. Thanks in advance.

回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!