matrix 1xn MatLab

1 visualizzazione (ultimi 30 giorni)
Takim Mustakim
Takim Mustakim il 8 Nov 2022
Modificato: Arif Hoq il 8 Nov 2022
a = [0 0 0 0 0 0 0 0 0 0];
b = [1 2 3];
how to make: c = [1 2 3 0 0 0 0 0 0 0]; from a and b

Risposta accettata

Arif Hoq
Arif Hoq il 8 Nov 2022
Modificato: Arif Hoq il 8 Nov 2022
a = [0 0 0 0 0 0 0 0 0 0];
b = [1 2 3];
a(1:length(b))=b;
c=a
c = 1×10
1 2 3 0 0 0 0 0 0 0

Più risposte (0)

Categorie

Scopri di più su Multidimensional Arrays in Help Center e File Exchange

Prodotti


Release

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by