how to make matlab file used as function?

조회 수: 1 (최근 30일)
Dhines
Dhines 2013년 7월 5일
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?

답변 (1개)

Walter Roberson
Walter Roberson 2013년 7월 5일
  댓글 수: 2
Dhines
Dhines 2013년 7월 5일
thank u sir...now i created the file name is test.m..its have some execution code. i make another one file is train.m..now i can call the file test.m in train.m..help me sir
Jan
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 CenterFile Exchange에서 Startup and Shutdown에 대해 자세히 알아보기

태그

아직 태그를 입력하지 않았습니다.

제품

Community Treasure Hunt

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

Start Hunting!

Translated by