Path: news.mathworks.com!newsfeed-00.mathworks.com!panix!bloom-beacon.mit.edu!llnews!53ab2750!not-for-mail
From: Peter Boettcher <boettcher@ll.mit.edu>
Newsgroups: comp.soft-sys.matlab
Subject: Re: go to next function in one callback?
References: <g5n6am$78p$1@fred.mathworks.com>
Message-ID: <muyej5m6npj.fsf@G99-Boettcher.llan.ll.mit.edu>
Organization: MIT Lincoln Laboratory
User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/23.0.0 (gnu/linux)
Cancel-Lock: sha1:PNKpdjBMTz+hhDpFxzbTtDTlrV8=
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Lines: 27
Date: Tue, 22 Jul 2008 09:41:12 -0400
NNTP-Posting-Host: 155.34.163.114
X-Complaints-To: news@ll.mit.edu
X-Trace: llnews 1216733329 155.34.163.114 (Tue, 22 Jul 2008 09:28:49 EDT)
NNTP-Posting-Date: Tue, 22 Jul 2008 09:28:49 EDT
Xref: news.mathworks.com comp.soft-sys.matlab:480951



"ching l" <chinglnc@hotmail.com> writes:

>  Is it possible to retain the previous value of the
> callback? something like this, but I know this is not right.
> I want the callback to store the previous count value and
> store in current count value
>
>
> handles.scount= 1;
> handles.scount= handles.scount+1;
>
> handles.sc{handles.scount}= [handles.id,
> (handles.randValue), 2] 
>
> handles.s = [handles.sc{handles.scount};
> handles.sc{handles.scount-1}] 
>
> guidata(hObject, handles);
>
>
> it still doesn't return the previous count value..any idea how?

Get rid of the semicolons so you can see what's happening.  Look at the
all the values on each click, figure out what isn't changing the way you
want, fix it, and try again.

-Peter