Borrar filtros
Borrar filtros

simple doubt about vector

1 visualización (últimos 30 días)
Hugo Matias
Hugo Matias el 9 de Nov. de 2018
Editada: madhan ravi el 11 de Nov. de 2018
Hi I have a simple daught on matlab and I was hoping you could help me!
Imagine i generate a random vector:
a=randi(5,1,7)
and it generates: 1 3 4 2 5 1 2
My daught is: how do i replace the 1's by 10's?

Respuesta aceptada

madhan ravi
madhan ravi el 9 de Nov. de 2018
Editada: madhan ravi el 9 de Nov. de 2018
a=randi(5,1,7)
a(a==1)=10
  1 comentario
madhan ravi
madhan ravi el 9 de Nov. de 2018
Editada: madhan ravi el 11 de Nov. de 2018
If this is what you want make sure to accept the answer so that people know the question is solved else let know

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Resizing and Reshaping Matrices en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by