Combining a matrix with a null matrix
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Arjun Upadhyay
am 1 Sep. 2020
Kommentiert: Arjun Upadhyay
am 3 Sep. 2020
I have a very basic problem. I want to replace some entries of zero matrix with the elements of another non zero matrix. I tried with for loop by using conditional statements. But it didn't work.
x = [1 2 3 4], Y= [0 0 0 0 0 0 0 0 0 0]
desired output
z = [1 2 3 4 0 0 0 0 0 0]
So anyone please help. Thanks in advanced
0 Kommentare
Akzeptierte Antwort
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Loops and Conditional Statements finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!