Data type error using 'find'

조회 수: 3 (최근 30일)
Manuel
Manuel 2013년 8월 26일
I have a list of double values(Test.TempCcol_10) in which one I want to find the indexes where the doubles values match with cond1(cell type since is taken from a listbox).
list1 = find(cell2mat(Test.TempCcol_10) == cond1)
If I introduced the cond1 as a double the command works perfectly but when cond1 is taken from a listbox I got the next error:
Undefined function 'eq' for input arguments of type 'cell'.
Error in plot_project(line 29)
list1 = find(cell2mat(Test.TempCcol_10) == cond1);
I tried to convert the cond1 but without succes.
Thanks in advance.

채택된 답변

Azzi Abdelmalek
Azzi Abdelmalek 2013년 8월 26일
Try this
list1 = find(cell2mat(Test.TempCcol_10) == str2double(cond1));
  댓글 수: 1
Manuel
Manuel 2013년 8월 26일
Thanks Azzi, was easier that i thought!

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Logical에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by