introducing the function in Matlab

조회 수: 2 (최근 30일)
Lukas
Lukas 2014년 4월 7일
댓글: Carlos 2014년 4월 7일
I am newbie , my english is very low , but i have problem with matlab .
Script:
function [a,b,c]=funtest01(x,y)
% to jest funkcja testowa
% a to jest druga linia pomocy dla funkcji funtest01
% to jest komentarz umieszczony w tej m-funkcji
a=x+y;
b=x-y;
c=x*y;
z=5;
Command :
[a,b,c]=funtest01(1,2)
then receives a message:
Undefined function 'funtest01' for input arguments of type 'double'.
What am I doing wrong?

답변 (2개)

Carlos
Carlos 2014년 4월 7일
편집: Carlos 2014년 4월 7일
Probably you have not stored the function in your working directory.Just change your working directory to the directory where your function is stored.
On top of the command line you can change the working directory using the button browse for folder. You can see the directory in which you are working where you read the legend "Current folder".

Lukas
Lukas 2014년 4월 7일
How can I do ?
  댓글 수: 1
Carlos
Carlos 2014년 4월 7일
Just change your working directory to the directory where your function is stored.
On top of the command line you can change the working directory using the button browse for folder. You can see the directory in which you are working where you read the legend "Current folder".

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

카테고리

Help CenterFile Exchange에서 Characters and Strings에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by