As in Matlab Notebook use functions?

4 views (last 30 days)
Cristian on 13 May 2014
Answered: cheng chen on 14 Mar 2017
As in Matlab use functions? For example, I wrote a function mymin, then created a .doc file and all placed in the same folder. Here is what is displayed when calling the function in MS Word:
vec=[1 2 3 4 4];
??? Undefined function 'mymin' for input arguments of type 'double'.

Answers (2)

Roberto on 13 May 2014
Edited: Roberto on 13 May 2014
From what i know, functions must be named * .m not * .doc and shouldn't be saved in msWord format, but plain text format, for example in wondows notepad or in the built-in editor!!

cheng chen
cheng chen on 14 Mar 2017
your matlab "current directory" must include the function "mymin" what you difined.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by