datatransfer between 2 GUIs

Hello Community,
I try to write a programm with 2 GUIs. (with GUIDE) in the first one, datasets will be selected and loaded. in the second one the selected dataset should be plotted, but just an interval aroud the selected idx.
the datasets are very big, and thats the problem.
If i'll pass the dataset as argument to the second GUI and save it to it's workspace, I'll get out of memory.
is there another option, without declarating the dataset as global? i know alignin and evalin, but i'll get bloody fingers with this solution.

 Akzeptierte Antwort

Arthur
Arthur am 19 Apr. 2012

0 Stimmen

Use setappdata and getappdata. This is an easy way to share data between GUIs, without copying the data.
Watch this excellent video from Doug Hull, wich explains it all:

3 Kommentare

geieraffe
geieraffe am 20 Apr. 2012
it works, but it's still no solution for my memory problem.
i still have to load the structs with getappdata() so that the needed struct reserves memory twice.
Walter Roberson
Walter Roberson am 20 Apr. 2012
Not unless you alter the contents.
abc = rand(1000,2000);
handles.abc = abc; %content of abc is NOT duplicated
abc(1,1) = 0; %but now it is duplicated
abc(3,7) = 0; %no further duplication
geieraffe
geieraffe am 3 Mai 2012
unfortunately i have to alter the contents.
so i have to run the program on the server now ... no memory problems, but i have to debug and run it on the server.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (1)

Sean de Wolski
Sean de Wolski am 19 Apr. 2012

1 Stimme

The dataset class is a value class so unfortunately you can't just pass its handle around.
For data xfer, see the FAQ:

Kategorien

Mehr zu MATLAB Parallel Server finden Sie in Hilfe-Center und File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by