concatenating matrices of a cell vertically
1 回表示 (過去 30 日間)
古いコメントを表示
i have a cell(1,n)=A of matrices (, the matrices have the same number of colums , and different number of rows . i want to concatenate all the matrices in the cell vertically using cat(1,M1,M2). i tried the following code ,but it doesn't work
for i=2:n
B(i-1)=cat(1,A{i-1},A{i});
end
B(:)
the following error appears
Error while evaluating uicontrol Callback
In an assignment A(I) = B, the number of elements in B and I
must be the same.
Error in Spro>export_button_Callback (line 1163)
B(i-1)=cat(1,A{i-1},A{i});
Error in gui_mainfcn (line 96)
feval(varargin{:});
Error in Spro (line 42)
gui_mainfcn(gui_State, varargin{:});
Error in
@(hObject,eventdata)Spro('export_button_Callback',hObject,eventdata,guidata(hObject))
Error while evaluating uicontrol Callback
0 件のコメント
採用された回答
Image Analyst
2014 年 1 月 25 日
What about this:
A = {ones(4,1),ones(5,1),ones(4,1),ones(5,1)}
allACells = cell2mat(A')
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Migrate GUIDE Apps についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!