MATLAB: Pass GUI parameters to script -


i running script gui , want enter value of parameters called l_al , l_inas , pass these script. following snippet of gui.m file, running script schrodingerpoisson42 on pressing button , trying assign values parameters l_al , l_inas (see last few lines):

    function l_inas_callback(hobject, eventdata, handles)     % hobject    handle l_inas (see gcbo)     % eventdata  reserved - defined in future version of matlab     % handles    structure handles , user data (see guidata)      % hints: get(hobject,'string') returns contents of l_inas text     %        str2double(get(hobject,'string')) returns contents of l_inas double       % --- executes during object creation, after setting properties.    function l_inas_createfcn(hobject, eventdata, handles)     % hobject    handle l_inas (see gcbo)     % eventdata  reserved - defined in future version of matlab     % handles    empty - handles not created until after createfcns called      % hint: edit controls have white background on windows.     %       see ispc , computer.      if ispc && isequal(get(hobject,'backgroundcolor'), get(0,'defaultuicontrolbackgroundcolor')) set(hobject,'backgroundcolor','white');    end      % --- executes on button press in pushbutton1.     function pushbutton1_callback(hobject, eventdata, handles)     % hobject    handle pushbutton1 (see gcbo)     % eventdata  reserved - defined in future version of matlab     % handles    structure handles , user data (see guidata)     l_al = str2num(get(handles.l_al,'string'));     l_inas = str2num(get(handles.l_inas,'string'));     schrodingerpoisson42; 


Comments