필터 지우기
필터 지우기

when defining functions on my matlab 7 version iam getting error!!!

조회 수: 1 (최근 30일)
mayuresh
mayuresh 2012년 7월 12일
??? function [f d] = add(x) | Error: Function definitions are not permitted at the prompt or in scripts.

채택된 답변

Jan
Jan 2012년 7월 12일
편집: Jan 2012년 7월 12일
The error message is clear: Functions can be defined inside M-files, when they are functions. You cannot create a function neither in M-scripts (M-files which does not start with "function ...", nor in the command window.
So open the editor to create a function. Then save the file to a user-defined folder, which is included in the path (see pathtool). (The later is not obligatory, but most likely what you want to.)

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Environment and Settings에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by