function parameter - char
5 ビュー (過去 30 日間)
古いコメントを表示
Hi everybody,
I wrote a function that get 4 parameters (one of them char = file name, and the other is arraies) and should open a file that his name was given, and some manipulations. function call looks like this
Amplitude_lie_det(file_name,qu_num,time_arr,answer_arr)
and I got an error :
??? Undefined function or method 'Amplitude_lie_det' for input arguments of type 'char'.
I will be very glad if someone that "meet" this error before can give me an advise...
thanks, Ashraf
0 件のコメント
回答 (3 件)
Guo
2012 年 5 月 12 日
You may check the type of your first parameter in the function,the error means you call your function with a mismatch parameter type(the first one)!
0 件のコメント
Oleg Komarov
2012 年 5 月 12 日
Check that the function is on the MATLAB path with:
which -all Amplitude_lie_det
If it says 'Amplitude_lie_det' not found, then add the path where the function is located to the MATLAB path:
addpath 'c:\yourpath'
or File > Set path > Add folder.
1 件のコメント
Walter Roberson
2012 年 5 月 12 日
And make sure the routine is stored in a file named Amplitude_lie_det.m
Ashraf
2012 年 5 月 12 日
1 件のコメント
Oleg Komarov
2012 年 5 月 12 日
Your initial issue is solved: if you think that my or Guo's suggestion helped you solve it, then accept one of the answers.
Then,since you're asking another question I suggest to post a new thread. You will get more attention from a wider pool of contributors and the chances to get an answer will not be tied to those that participated to this thread only.
参考
カテゴリ
Help Center および File Exchange で Array Geometries and Analysis についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!