loading and accessing cell array
Mostra commenti meno recenti
I had a Table cell of dimension 6x32x32. I saved it in my folder using save('Table.mat','Table') In another function I loaded it using Table = struct2cell(load('Table.mat')) which resulted in {1x1} cell. Now I am trying to access the original Table{6x32x32} by using "cell2mat(Table)" but I am getting an error
??? Error using ==> cell2mat at 53 Cannot support cell arrays containing cell arrays or objects.
How should I get around this problem.
Risposte (1)
Azzi Abdelmalek
il 18 Giu 2013
cell2mat(table{1})
8 Commenti
xplore29
il 18 Giu 2013
Azzi Abdelmalek
il 18 Giu 2013
I think the original dimension is 16x64x4
xplore29
il 18 Giu 2013
Azzi Abdelmalek
il 18 Giu 2013
Can you post a sample of your data?
xplore29
il 18 Giu 2013
Azzi Abdelmalek
il 19 Giu 2013
If you want your data in non struct format use
load Table
xplore29
il 19 Giu 2013
Azzi Abdelmalek
il 19 Giu 2013
Suppose, your file table contains variables x1,x2 and x3
load table % will load x1,x2 and x3 to your workspace
data=load('table') % will create a struct variable data with fields x1,x2, and x3 . To get your variables
x1=data.x1
x2=data.x2
x3=data.x3
Categorie
Scopri di più su Data Type Conversion in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!