problem in storing data in cell
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
mira
am 19 Apr. 2015
Kommentiert: Image Analyst
am 20 Apr. 2015
I have a loop and the result will be different in the loop. I want to store the result in a cell. However, only the last part will display in the cell. here is the result when I run the coding.
new =
[0x512 double]
new =
[]
[143x512 double]
new =
[]
[]
[146x512 double]
what is the problem?
0 Kommentare
Akzeptierte Antwort
Image Analyst
am 20 Apr. 2015
Looks like you're initializing new inside a loop, like this
for k = 1 : 3
new = cell(3,1);
new{k} = someArray;
end
You need to take the initialization step out of the loop and put it before the loop, like this:
new = cell(3,1);
for k = 1 : 3
new{k} = someArray;
end
2 Kommentare
Image Analyst
am 20 Apr. 2015
There is not enough information to answer that. Perhaps the FAQ will help: http://matlab.wikia.com/wiki/FAQ#How_can_I_share_data_between_callback_functions_in_my_GUI.28s.29.3F
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Downloads finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!