필터 지우기
필터 지우기

Number of functions in a function-M file

조회 수: 1 (최근 30일)
Shalini
Shalini 2012년 3월 5일
Is it that there should be only one function in a function M file or there can be any number of functions in a function M file?

채택된 답변

Igor de Britto
Igor de Britto 2012년 3월 5일
A m-file can have more than one function.

추가 답변 (2개)

Shalini
Shalini 2012년 3월 5일
I have a function 'A'
Inside the function A, there is a variable computed 'z'
'z' should be returned from another function 'B' .'A' and 'B' should be in the same M file.
Can you tell me the syntax for such a situation/ returning a value within a function from another function?

Sean de Wolski
Sean de Wolski 2012년 3월 5일
function z = A;
z = B;
function z = B;
z = pi;
All of it saved in B.m

카테고리

Help CenterFile Exchange에서 Standard File Formats에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by