Filter löschen
Filter löschen

how to make matlab file used as function?

1 Ansicht (letzte 30 Tage)
Dhines
Dhines am 5 Jul. 2013
i created one matlab file having some of code. now i created another matlab file, here i have to use previous matlab file. how to make the function for call that file in my new code?

Antworten (1)

Walter Roberson
Walter Roberson am 5 Jul. 2013
  2 Kommentare
Dhines
Dhines am 5 Jul. 2013
thank u sir...now i created the file name is test.m..its have some execution code. i make another one file is train.m..now i can call the file test.m in train.m..help me sir
Jan
Jan am 5 Jul. 2013
Bearbeitet: Jan am 5 Jul. 2013
@prasanna: I'm surprised. You ask questions in this forum for 9 months now and it is explained in the Getting Started chapters of the documentation exhaustively how functions and scripts are written and used.
You wrote "now I can call the file test.m in train.m", so where is the problem? Do you mean "I can't call test.m"? Then note, that your own function is called like every other function also. But the exact calling depends on the input and output arguments of your function and as long as you do not explain this, an explicit answer might be more confusing than helpful.
Please read the links Walter has posted.

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Startup and Shutdown finden Sie in Help Center und File Exchange

Tags

Noch keine Tags eingegeben.

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by