The Math Forum

Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Math Forum » Discussions » Software » comp.soft-sys.matlab

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: pushbutton saving problem
Replies: 0  

Advanced Search

Back to Topic List Back to Topic List  

Posts: 48
Registered: 11/16/07
pushbutton saving problem
Posted: May 15, 2014 7:03 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

Hi there

I have a 2d plot (hhh handle) done with imagesc to which I want to add a line if a pushbutton is pressed, and remove the same lien if the push button is released.

When the pushbutton is pressed the line shows OK, however if the pushbutton is released there is this error:

Undefined function or variable 'Hline'

Lokks line the program can´t remember the Hline value even it is being updated with guidata. What am I doing wrong? Thanks

Here is the function

function abc(x)
% x is a m x n matrix

% now a pushbutton to put or remove a line in the above plot

'units','normalized','pos', [tf_left 0 .1/2 1/25],'parent',hhh,'HandleVisibility','on', 'fontSize',6,'Callback',{@put_remove_line ,delta_f_line, hhh ,Hline});

end % end abc function
%radiobutton callback function

function put_remove_line(hObject,event,delta_f_line,hhh,Hline)

if a % if button is pressed a
xlimits=get(gca,'XLim');,[delta_f_line], 'LineStyle',':','LineWidth',2);


Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.