Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: Successive Matrix Midpoint Operations
Replies: 5   Last Post: Mar 21, 2013 5:58 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Bruno Luong

Posts: 8,813
Registered: 7/26/08
Re: Successive Matrix Midpoint Operations
Posted: Mar 21, 2013 5:58 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

"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



Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.