[英]How to convert a cell array of 2D matrices into a multidimensional array in MATLAB
[英]How to convert cell array of matrices into a column matrix in MATLAB?
我有一個矩陣的像元數組,看起來像這樣:
G =
Columns 1 through 6
[507x1 double] [255x1 double] [130x1 double] [67x1 double] [36x1 double] [19x1 double]
Columns 7 through 9
[11x1 double] [6x1 double] [4x1 double]
這意味着矩陣位於單元陣列內。 矩陣G
中總共包含507 + 255 + 130 + 67 + 36 + 19 + 11 + 6 + 4 = 1035個元素。 我可以使用G{i}
命令提取任何單元格。 但是,我需要所有1035個元素都位於單列或行矩陣中。 我已經試過cell2mat(G)
但是那行不通。
我在這里可以做些什么來創建一個包含所有其他矩陣的矩陣?
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.