Search All of the Math Forum:
Views expressed in these public forums are not endorsed by
NCTM or The Math Forum.



Re: Successive Matrix Midpoint Operations
Posted:
Mar 21, 2013 5:58 PM


"K" wrote in message <kifjjn$q7s$1@newscl01ah.mathworks.com>... > "Bruno Luong" <b.luong@fogale.findmycountry> wrote in message > I'm going to try to see if I can work in my own operation into the code. Although the 'fun' tag is incredibly useful, the operation I want to perform is not a standard one. >
But what make you think that fun must be a standard one? Fun is a generic function that takes any 1x2 array and returns a result.
>> fun = @(a) 1/a(1) + 3*a(2)
fun =
@(a)1/a(1)+3*a(2)
>> midfill([1 NaN NaN NaN NaN NaN NaN NaN 9],fun)
ans =
1.0000 256.0000 85.0000 84.0118 28.0000 81.1429 27.0357 27.0370 9.0000
% Bruno



