Returning parameters from a called function
24 ビュー (過去 30 日間)
古いコメントを表示
Hello! I have what may be an elementary question, but I have been struggling with it for a little while:
I am calling another function from a master function
(ex. called_function(passed, parameters))
the called function is structured:
function called_function(passed, parameters) %operations, in which new parameters are defined return;
What I need is to use some of the new parameters that are defined in my called function in the master function.
How can I do this?
Thank you in advance for your responses!
Amina
0 件のコメント
採用された回答
the cyclist
2011 年 7 月 26 日
function [output1 output2] = called_function(input1,input2)
% output1 and output2 calculated inside here
0 件のコメント
その他の回答 (1 件)
Jan
2011 年 7 月 26 日
A very basic question. Please read the "Getting Started" chapters of the documentation.
2 件のコメント
Sinan Islam
2020 年 11 月 17 日
A very basic question but I dont think any other software on the planet uses this syntax. Matlab is probably the only software on the planet that includes the returned arguments as part of the function signature.
Sahil Tayade
2020 年 11 月 18 日
All softwares have return type in their signiture, matlab is the only one that has the name of the variables
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!