How to merge multiple matrices

I need to combine multiple matrices (doubles) (all the same length with padding of 0) into one matrix without losing their 'position'. The problem is when I do that, it seems that the numbers physically add in the one matrix rather than just become one matrix retaining all of the individual numbers. How would I combine all these matrices together? The end result is that I will need to plot this set of combined matrices with another set of combined matrices

댓글 수: 4

the cyclist
the cyclist 2016년 1월 24일
Can you give a small example or two of input and output matrices that illustrate how you want them combined?
Jason Moore
Jason Moore 2016년 1월 24일
x = ones(5,5) y = zeros(5,5) z = [x,y]
Z will end up being a combined matrix with a dimension of 5x10
Image Analyst
Image Analyst 2016년 1월 24일
A "matrix" is a 2-D array. What do you mean by the "length" of a matrix? What do you mean by padding? Can you give a numerical example?
jgillis16
jgillis16 2016년 1월 24일
I've attached two examples of doubles I want to combine into one double. Image: you can also take a look at my previous question http://www.mathworks.com/matlabcentral/answers/264290-need-to-combine-doubles-with-different-sizes

댓글을 달려면 로그인하십시오.

답변 (1개)

Star Strider
Star Strider 2016년 1월 24일

0 개 추천

One option is to use the cat function.
(Meow!)

카테고리

도움말 센터File Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기

질문:

2016년 1월 24일

댓글:

2016년 1월 24일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by