Different size matrix data addition
이전 댓글 표시
I have different matrix size for different data file. say one data is 846x399 and another is 4208x399. I need to add all the files. how to do it?
답변 (1개)
DEEPAK SHARMA
2020년 5월 20일
0 개 추천
Define your Matrix A(846x399) , B(4208x399)
Define C = zeros(1,399);
A = [A;repmat(C,3362,1)];
new Matrix A will be 4208x399
now you can add A and B
댓글 수: 1
Walter Roberson
2020년 5월 20일
Might as well just do
A(size(B,1), end) = 0;
카테고리
도움말 센터 및 File Exchange에서 Resizing and Reshaping Matrices에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!