Note that there are some explanatory texts on larger screens.

plurals
  1. POPassing variables between GUI in Matlab
    text
    copied!<p>I am new to matlab and haven't got long to produce interlinking GUI. It is a lot easier to work from specific examples. I have found generic examples but do not know which sections are Matlab functions and which need to be edited. Would it be possible to demonstrate for this code how to pass information from the edittext's into bladedesign.fig and how they would be accessed in bladedesign.fig?</p> <p>Pushbutton4 is a submit button. edittext9 is a variable text box.</p> <pre><code>function edit9_Callback(hObject, eventdata, handles) % hObject handle to edit9 (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 edit9 as text % str2double(get(hObject,'String')) returns contents of edit9 as a double % --- Executes during object creation, after setting all properties. function edit9_CreateFcn(hObject, eventdata, handles) % hObject handle to edit9 (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles empty - handles not created until after all CreateFcns called % Hint: edit controls usually have a white background on Windows. % See ISPC and COMPUTER. if ispc &amp;&amp; isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) set(hObject,'BackgroundColor','white'); end % --- Executes on button press in pushbutton4. function pushbutton4_Callback(hObject, eventdata, handles) % hObject handle to pushbutton4 (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) close(gcf) openfig(bladedesign.fig) </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload