Matlab GUI: How to Save the Results of Functions (states of application)

Posted by niko on Stack Overflow See other posts from Stack Overflow or by niko
Published on 2010-05-10T15:27:14Z Indexed on 2010/05/10 21:04 UTC
Read the original article Hit count: 171

Filed under:
|

Hi,

I would like to create an animation which enables the user to go backward and forward through the steps of simulation.

An animation has to simulate the iterative process of channel decoding (a receiver receives a block of bits, performs an operation and then checks if the block corresponds to parity rules. If the block doesn't correspond the operation is performed again and the process finally ends when the code corresponds to a given rules).

I have written the functions which perform the decoding process and return a m x n x i matrix where m x n is the block of data and i is the iteration index. So if it takes 3 iterations to decode the data the function returns a m x n x 3 matrix with each step is stired.

In the GUI (.fig file) I put a "decode" button which runs the method for decoding and there are buttons "back" and "forward" which have to enable the user to switch between the data of recorded steps.

I have stored the "decodedData" matrix and currentStep value as a global variable so by clicking "forward" and "next" buttons the indices have to change and point to appropriate step states.

When I tried to debug the application the method returned the decoded data but when I tried to click "back" and "next" the decoded data appeared not to be declared.

Does anyone know how is it possible to access (or store) the results of the functions in order to enable the described logic which I want to implement in Matlab GUI?

© Stack Overflow or respective owner

Related posts about matlab

Related posts about gui