dimension consistency of matrix

5 vues (au cours des 30 derniers jours)
Tino
Tino le 14 Mai 2019
Réponse apportée : Raj le 14 Mai 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

Réponses (1)

Raj
Raj le 14 Mai 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)]

Catégories

En savoir plus sur Get Started with MATLAB dans Help Center et File Exchange

Tags

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by