Simple solution to manuplate matrix
Mostrar comentarios más antiguos
consider i have matrix A=[1 2 3 4 5 6 7 8 9 ]; B=[9 8 7]; i want to add them in such a way that C= A+B = [1 2 3 4 5 6 ,9 8 7]; i used the for loop but it takes too much processing time wonder if there is qa simple solution to this
as=size(A); bs=size(B); for r= 1: as(2)-bs(2); cs(1,r)=A(1,r); end C=[cs,B];
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Introduction to Installation and Licensing en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!