call a function within another function
2 ビュー (過去 30 日間)
古いコメントを表示
How to call a m file(this is also one function) within another function
0 件のコメント
採用された回答
その他の回答 (4 件)
Abhishek M
2014 年 4 月 1 日
Hi,
What I understood is that you are trying to call a m-file through another m-file, if that's what you are trying, then place both the files in the same path and try calling with the same name given for the secondary m-file in the code of the primary m-file.
0 件のコメント
Dishant Arora
2014 年 4 月 1 日
fucnction functionFileName1()
% Code
functionFileName2; % Another function you want to call
end
0 件のコメント
Chandrasekhar
2014 年 4 月 1 日
I guess you want to have two function within same m file.
function fun_one()
fun_two();%this is another function
function fun_two()
%function body here
0 件のコメント
ragesh r menon
2014 年 4 月 1 日
You can use function handles for this. The task is to create a handle of the function you want to call and pass this to the other function. A tutorial is given in the the following link : Applications of Function Handles
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Get Started with MATLAB についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!