Help on this error

  • Follow


really need help here. i am sure its simple please someone help.

Code for pushbutton:

function edit1_Callback(hObject, eventdata, handles)
% hObject    handle to edit1 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'String') returns contents of edit1 as text
%        str2double(get(hObject,'String')) returns contents of edit1 as a double


% --- Executes on button press in pushbutton1.
function pushbutton1_Callback(hObject, eventdata, handles)
% hObject    handle to pushbutton1 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)
set_param('mymodel','lock','edit1');



lock is the parameter in mymodel i want to change. edit1 is the the text field in my GUI.

ERROR:


??? Error using ==> GUI>pushbutton1_Callback at 104
block_diagram does not have a parameter named 'lock'.

Error in ==> gui_mainfcn at 96
        feval(varargin{:});

Error in ==> GUI at 42
    gui_mainfcn(gui_State, varargin{:});

Error in ==> @(hObject,eventdata)GUI('pushbutton1_Callback',hObject,eventdata,guidata(hObject))



I have set the path correct and the parameter is a constant block called 'lock' in mymodel.

what is the problem
Th
0
Reply luke 3/19/2010 12:38:04 AM

Dear Luke!

You did not specify where the problem occurs exactly.
Please try this:
  dbstop if all error
Then the debugger stops when a problem occures and you can inspect the variables in the command window to find the problem -- and hopefully its solution.

Kind regards, Jan
0
Reply Jan 3/19/2010 5:39:04 PM


"luke stone" <ifu-uk@hotmail.com> wrote in message <hnuh1c$bhc$1@fred.mathworks.com>...
> really need help here. i am sure its simple please someone help.
> 
> Code for pushbutton:
> 
> function edit1_Callback(hObject, eventdata, handles)
> % hObject    handle to edit1 (see GCBO)
> % eventdata  reserved - to be defined in a future version of MATLAB
> % handles    structure with handles and user data (see GUIDATA)
> 
> % Hints: get(hObject,'String') returns contents of edit1 as text
> %        str2double(get(hObject,'String')) returns contents of edit1 as a double
> 
> 
> % --- Executes on button press in pushbutton1.
> function pushbutton1_Callback(hObject, eventdata, handles)
> % hObject    handle to pushbutton1 (see GCBO)
> % eventdata  reserved - to be defined in a future version of MATLAB
> % handles    structure with handles and user data (see GUIDATA)
> set_param('mymodel','lock','edit1');
> 
> 
> 
> lock is the parameter in mymodel i want to change. edit1 is the the text field in my GUI.
> 
> ERROR:
> 
> 
> ??? Error using ==> GUI>pushbutton1_Callback at 104
> block_diagram does not have a parameter named 'lock'.
> 
> Error in ==> gui_mainfcn at 96
>         feval(varargin{:});
> 
> Error in ==> GUI at 42
>     gui_mainfcn(gui_State, varargin{:});
> 
> Error in ==> @(hObject,eventdata)GUI('pushbutton1_Callback',hObject,eventdata,guidata(hObject))
> 
> 
> 
> I have set the path correct and the parameter is a constant block called 'lock' in mymodel.
> 
> what is the problem
> Th

instead of whining again and again, you must keep up with your old threads...

http://www.mathworks.com/matlabcentral/newsreader/view_thread/276826

have you ever bothered to look at it - and try it...

us
0
Reply us 3/19/2010 5:53:04 PM

2 Replies
314 Views

(page loaded in 0.043 seconds)

Similiar Articles:













7/20/2012 10:24:31 PM


Reply: