How can we create a vector of length n

229 visualizaciones (últimos 30 días)
Omar B.
Omar B. el 19 de Sept. de 2019
Comentada: Omar B. el 19 de Sept. de 2019
Hello,
How can we write in Matlab vector u= [1/10 ,1/10 ,..., 1/10] where u \in{R}^{200}

Respuesta aceptada

James Tursa
James Tursa el 19 de Sept. de 2019
Editada: James Tursa el 19 de Sept. de 2019
There are many ways of doing this. E.g., use the ones( ) function and divide by 10. Or use the zeros( ) function and add 1/10. Or use the repelem( ) function. Etc.
  2 comentarios
Bruno Luong
Bruno Luong el 19 de Sept. de 2019
1/10+zeros(1,200)
1/10*ones(1,200)
Omar B.
Omar B. el 19 de Sept. de 2019
Thank you so much

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Get Started with MATLAB 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