MATLAB Answers

Tino
0

dimension consistency of matrix

Asked by Tino
on 14 May 2019
Latest activity Answered by Raj
on 14 May 2019
Hello
I have 2 columns
A B
1 2
2 4
3 3
4 1
6
1
3
4
5
6
How do I make B the same size as A by completting the length with zero to make it the same dimension
Thanks advance

  0 Comments

Sign in to comment.

Tags

Products

1 Answer

Answer by Raj
on 14 May 2019

A=[1;2;3;4;6;1;3;4;5;6]
B=[2;4;3;1]
B= [B;zeros(numel(A)-numel(B),1)]

  0 Comments

Sign in to comment.