http://bhudson.livejournal.com/ ([identity profile] bhudson.livejournal.com) wrote in [personal profile] meganursula 2008-09-12 05:00 am (UTC)

Say you declare a native array in C like you did, and you screw up and you write to the n+1st element of it. You just lost, badly -- now maybe you clobbered the loop variable and you'll sometimes not stop even though other times seem to work fine. To avoid that, you need to define a vector type, a bunch of functions on that type, and then you are stuck using the type and its functions That takes a lot of verbiage.

Also, I don't think you mean higher-order function the way I usually mean it, but I can't quite figure out what you mean. Solving Ax=b is written "A \ b" (as in, "divide" A by b, but with a backslash because it's not really division). Maybe matrix multiply would have been a better example, but I forget what the matlab operator is for that.

Post a comment in response:

This account has disabled anonymous posting.
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting