1

I have main gui with two other sub gui, i understood how to get a output variable from one sub gui to main gui.

This pushbutton function is in main gui

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

   m_sc = sub_MoistureContent_Calculator();

This pushbutton function is in sub1 gui:

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

    m_sc = getappdata(handles.sub_Moist_Calc, 'appdata_m_sc');
    handles.output = m_sc;
    guidata(hObject,handles);
    uiresume(gcf);

But i want this m_sc variable in to a another sub gui, what do i need to do for this to happen?

1 Answer 1

2

You could use appdata to share data between the two GUI's.

One way to achieve this: Register both GUI's and their relation in appdata for MATLAB (handle == 0).

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.