Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
structure of data uicontrol

Subject: structure of data uicontrol

From: Jose

Date: 4 Aug, 2010 13:40:22

Message: 1 of 1

Hello to everyone, I have some structure of variables called st:

st:

hfigure: {[1] [] [3] [] []}
           hz: [0.1000 0.1000 0.1000 0.1000 0.1000]
       deltaz: [1 1 1 1 1]
         icxx: [0 0 0 0 0]
        isxxy: [0 0 0 0 0]
     
and a need to call the function "stoprecording" with an uicontrol:

hseek=uicontrol('parent',st.hfigure{e},'String', 'seek',...
       'Position', [10,10,60,20]);
    set(hseek,'Callback',@(src,event)stoprecording(src,event,st));

function stoprecording(src,~,st)

val=get(src,'parent')

st.icxx(val)=2;

st.hz(val)=2;

 
 return


The problem is that I only need to send two variables icxx and hz, and I donĀ“t need to send all the structuture of data, st.........any help with it?

Anther problem, if in the case of i want to send the structure of data st to the function, once st is update with the new values of the variables: st.icxx ans st.hz, how can pass the strusture of data, st back to the main program?



Thanks in advance.

Jose.

      

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us