Extracting data from a structure
1 回表示 (過去 30 日間)
古いコメントを表示
I have performed DCT on an image(256×256) and the the compressed data is saved in a file. When i open this file in workspace, the compressed file is a 32×32 structure, with cells, each containing binary digits of different lengths(some more than 128) for each cell. I would like to extract these digits and align them in 1 matrix, however i do not know how to do this. Can you please advise me on how to solve this problem in matlab.
0 件のコメント
採用された回答
José-Luis
2013 年 2 月 1 日
I am not sure I understand your question. But if what you mean is that you have a cell array of structures and that you want to extract one element from each structure, then you could do as follows:
a.whatever = 125; %some structure
your_cell = cell(10,5);
your_cell(:) = {a};
your_mat = cellfun(@(x) x.whatever,your_cell);
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Denoising and Compression についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!