how to make matlab file used as function?
1 回表示 (過去 30 日間)
古いコメントを表示
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?
0 件のコメント
回答 (1 件)
Walter Roberson
2013 年 7 月 5 日
2 件のコメント
Jan
2013 年 7 月 5 日
編集済み: Jan
2013 年 7 月 5 日
@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.
参考
カテゴリ
Help Center および File Exchange で Startup and Shutdown についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!