필터 지우기
필터 지우기

Returning parameters from a called function

조회 수: 14 (최근 30일)
A
A 2011년 7월 26일
댓글: Sahil Tayade 2020년 11월 18일
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

채택된 답변

the cyclist
the cyclist 2011년 7월 26일
function [output1 output2] = called_function(input1,input2)
% output1 and output2 calculated inside here

추가 답변 (1개)

Jan
Jan 2011년 7월 26일
A very basic question. Please read the "Getting Started" chapters of the documentation.
  댓글 수: 2
Sinan Islam
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
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

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Gravitation, Cosmology & Astrophysics에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by