maroxe
maroxe

Reputation: 2127

Define a function in a matlab's shell session

I know that in matlab, functions are supposed to live in their own file. But what about matlab shell? Is there a way to define function in the shell?

I am asking because I am using matlab in org-mode in emacs, and all my code has to be executed my a session, as a result I cannot define functions, which very annoying to say the least.

Any help will be appreciated!

Upvotes: 0

Views: 86

Answers (1)

neerad29
neerad29

Reputation: 473

You can use Anonymous Functions in MATLAB:

http://www.mathworks.com/help/matlab/matlab_prog/anonymous-functions.html

Upvotes: 0

Related Questions