cell2struct is running during execution in command window but not in program

16 ビュー (過去 30 日間)
nithish
nithish 2013 年 2 月 17 日
i'm extracting a cell array value using cell2struct function .it yields me the answer when i'm running the code in command window. but when executing during the program it returns me a error
Undefined function 'cell2struct' for input arguments of type 'double'.
Error in authen>authenticate_Callback (line 141) a=cell2struct(raw,'A1',2);
  2 件のコメント
Azzi Abdelmalek
Azzi Abdelmalek 2013 年 2 月 17 日
Please, provide enough information.
Jan
Jan 2013 年 2 月 17 日
Is this an exact copy of the error message or did you paraphrase it? Please post exact copies in every case, because a paraphrased message could omit the actual problem, e.g. a typo in "cell2struct".

サインインしてコメントする。

回答 (2 件)

Azzi Abdelmalek
Azzi Abdelmalek 2013 年 2 月 17 日
Maybe raw is not a cell number in your script. In your m-file type this
class(raw)
and make comment
% a=cell2struct(raw,'A1',2);
What did you get?

Walter Roberson
Walter Roberson 2013 年 2 月 17 日
Is it possible that your program is adjusting the MATLAB path to the point where the normal cell2struct is not on the path?
Also, just in case, please edit the line and retype "cell2struct" -- just in case one of those lower-case-L is a digit-one in the code.

カテゴリ

Help Center および File ExchangeCell Arrays についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by