Borrar filtros
Borrar filtros

matrix manipulations of columns

1 visualización (últimos 30 días)
Charlene
Charlene el 8 de Mayo de 2013
How can I replace all even columns of matrix A by columns of ones.
pls note that matrix A is A=random('norm',3,0.2,100,100)
thx

Respuesta aceptada

Azzi Abdelmalek
Azzi Abdelmalek el 8 de Mayo de 2013
Editada: Azzi Abdelmalek el 8 de Mayo de 2013
A=random('norm',3,0.2,100,100)
A(:,2:2:end)=ones(size(A(:,2:2:end)))

Más respuestas (0)

Categorías

Más información sobre Matrix Indexing 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!

Translated by