create a matrix with the same entry

I would like to create, given x and NRows, a vector y that is NRows*1 and every element of y is x. Please advise.

 Respuesta aceptada

Rik
Rik el 14 de Abr. de 2018
Something like this maybe?
y=x*ones(NRows,1);

Más respuestas (0)

Categorías

Más información sobre Get Started with MATLAB en Centro de ayuda y File Exchange.

Productos

Etiquetas

Preguntada:

el 14 de Abr. de 2018

Respondida:

Rik
el 14 de Abr. de 2018

Community Treasure Hunt

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

Start Hunting!

Translated by