I'm using Matlab 7.0. How can I call a function? "File/New/Function" is missing.
조회 수: 2 (최근 30일)
이전 댓글 표시
Or should I write an .m file instead beginning with:
function F = magic(x)
...
end
?
댓글 수: 0
채택된 답변
Stalin Samuel
2014년 10월 25일
you need to create a .m file .And the file name must same as the function name
댓글 수: 0
추가 답변 (3개)
Zoltán Csáti
2014년 10월 25일
The syntax of writing a function is what you have written. When you want to call it, do
out = magic(in)
Be careful though, magic is a function that already exists.
댓글 수: 0
Zoltán Csáti
2014년 10월 25일
Not a problem. It is just a help for you so that MATLAB creates a sample in advance. I never use this feature because it is not cumbersome to type function.
댓글 수: 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!