combining matrices by replacing zeros
4 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
I have two matrices of the same length;
A = [1 ,0, 2, 0, 3, 0, 5]; B = [0, 2, 0, 3, 0, 5, 0];
I want to be 'combine' them into one matrix where the zeros 'disappear'; C = [1, 2, 2, 3, 3, 5, 5];
May I know how to do this?
0 Kommentare
Akzeptierte Antwort
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Elementary Math 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!