vectors problem, como podria unir los vectores
Ältere Kommentare anzeigen
Como podria dar el valor del segundo vector al primero donde haya 0 ,ambos de gran tamaño?
Pero que solo sustituya los valores de 0 hasta la longitud del vector A
por ejemplo:
A=[ 1 0 0 0 0 1 1 0 1 0 0 1 1 1 1 0 0 01 0 1 0 0];
B= [2 0 2 2 2 0 2 0 2 2 0 0 2 0 2 2 0 0 0 2 0 2 02 0 2 2 2 0 2 2];
Result=[ 1 2 2 2 2 1 1 2 1 2 2 1 1 1 1 2 2 1 2 1 2 2 ];
se que podria ser con un for, pero aun no logro interpretarlo ?
por favor podrian ayudarme
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu MATLAB finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
