Undefined function or method 'plus' for input arguments of type 'cell'.

hi... someone please help me... i'm stuck with this code:
% --- Executes on selection change in FirstPopup function
FirstPopup_Callback(hObject, eventdata, handles)
idMode = get (hObject, 'Value');
if idMode == 1
A = set(handles.FirstPopup,'value');
FirstValue=A +(-11);
else if idMode == 2
A= set (handles.FirstPopup, 'Value');
FirstValue= A+(7);
end
end
i try to use "+" to add value i've got from FirstPopup. but there's an error:
" Undefined function or method 'plus' for input arguments of type 'cell'."
now, what should i do..?

1 件のコメント

Alex
Alex 2012 年 1 月 19 日
Could you also tell us the line where the error is?

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

回答 (2 件)

David
David 2012 年 1 月 19 日

1 投票

Should the lines
A = set(handles.FirstPopup,'value');
not read
A = get(handles.FirstPopup,'value');
randy
randy 2012 年 1 月 19 日

0 投票

thank you for the answer and response.. but i've manipulate it and solve it.. i'm adding one push button and using
set(handles.FirstPopup,'value').. it's look like this:
function button_Ok_Callback(hObject, eventdata, handles)
Value=get(handles.FirstPopup,'value');
if (Value == 1)
FirstValue=Value-11;
else
FirstValue=Value+7;
end
.
........
.......
% --- Executes on selection change in FirstPopup.
function FirstPopup_Callback(hObject, eventdata, handles)
% every command here has been deleted.
thank you... randy

カテゴリ

ヘルプ センター および File ExchangeGet Started with Optimization Toolbox についてさらに検索

質問済み:

2012 年 1 月 19 日

Community Treasure Hunt

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

Start Hunting!

Translated by