"Function" function doesn't work

when I write function dx, this appears. Error: Function definition are not supported in this context. Functions can only be
created as local or nested functions in code files. How can i solve this problem?

댓글 수: 1

Torsten
Torsten 2022년 6월 12일
Show is in more detail what you are trying to do and what code you use.

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

답변 (1개)

Image Analyst
Image Analyst 2022년 6월 12일

0 개 추천

Maybe you have a function after your script in an m-file. If so, add and "end" line after the last line of your function.
function results = dx()
% Body of the function.....
end % Add this line.

카테고리

도움말 센터File Exchange에서 Entering Commands에 대해 자세히 알아보기

질문:

2022년 6월 12일

답변:

2022년 6월 12일

Community Treasure Hunt

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

Start Hunting!

Translated by