MATLAB GUI Error while using set -
why cant have output in edit text?
% --- executes on button press in f. function f_callback(hobject, eventdata, handles) % hobject handle f (see gcbo) % eventdata reserved - defined in future version of matlab % handles construction handles , user info (see guidata) clc syms t a=str2double(get(handles.b1,'string')); b=str2double(get(handles.c1,'string')); y=eval(get(handles.a1,'string')); u=a-b; m=abs(y).^2; r=int(m,t); g1=subs(r,t,a); h=subs(r,t,b); fh=g1-h; s=fh./u set(handles.e,'string',s)';
command window shows reply not edit text.the error is: error using set error: mxarray must double, char, or cell
error in signalproject2>f_callback (line 284) set(handles.e,'string',s)'; error in gui_mainfcn (line 96) feval(varargin{:}); error in signalproject2 (line 42) gui_mainfcn(gui_state, varargin{:}); error in @(hobject,eventdata)signalproject2('f_callback',hobject,eventdata,guidata(hobject)) error while evaluating uicontrol callback
can u please help me this?
what info type of s
? utilize whos s
find out.
if it's not double, char, or cell won't able assign string edit box. error message tells you.
i don't have symbolic math toolbox can't check code, i'm guessing s
symbolic array. if case, see documentation char
convert symbolic array string can assign properly.
matlab
No comments:
Post a Comment