2016-02-26 21 views
0

我知道在matlab中,函數應該存在於它們自己的文件中。但是,matlab shell呢?有沒有辦法在shell中定義函數?在matlab的shell會話中定義一個函數

我在問,因爲我在emacs中使用org模式的matlab,並且我的所有代碼都必須執行我的會話,因此我無法定義函數,這至少令人討厭。

任何幫助將不勝感激!

回答

0
+1

但問題是,他們可以只包含一個可執行語句 – maroxe

+0

您可以使用它們仍然寫的相當複雜的程序:HTTP://博客.mathworks.com/loren/2013/01/24/introduction-to-functional-programming-with-anonymous-functions-part-2/ – neerad29

+0

實現循環:http://blogs.mathworks.com/loren/2013/02/07/Introduction-to-functional-programming-with-anonymous-functions-part-3/ – neerad29

相關問題