As in Matlab Notebook use functions?

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];
a=mymin(vec)
??? Undefined function 'mymin' for input arguments of type 'double'.

Respuestas (2)

Roberto
Roberto el 13 de Mayo de 2014
Editada: Roberto el 13 de Mayo de 2014

0 votos

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 el 14 de Mzo. de 2017

0 votos

your matlab "current directory" must include the function "mymin" what you difined.

Categorías

Más información sobre Environment and Settings en Centro de ayuda y File Exchange.

Etiquetas

Preguntada:

el 13 de Mayo de 2014

Respondida:

el 14 de Mzo. de 2017

Community Treasure Hunt

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

Start Hunting!

Translated by