change columns in array to zeros and assign to another vector
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Oday Shahadh
el 20 de Jun. de 2020
Comentada: KSSV
el 20 de Jun. de 2020
hi
I have a (n,3) array, I need to make the first and second coulmns zeros, and assign the resulted array to a new one
g=(a{1}(:,[1 2])==0);
tried this but not work
0 comentarios
Respuesta aceptada
KSSV
el 20 de Jun. de 2020
n = 10 ;
A = rand(n,3) ; % matrix for demo
A(:,1:2) = 0 ; % make first two columns zero
B = A ; % assign tp B
3 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Creating and Concatenating Matrices en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!