Info

La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.

create a vector with specified entries

3 visualizaciones (últimos 30 días)
Matheus
Matheus el 29 de Nov. de 2014
Cerrada: MATLAB Answer Bot el 20 de Ag. de 2021
Hello, I need to create the following vectors:
x=[0 0 0 ...0] and y=[h h h...h]
where h is a constant that I declared. Both vectors need to have a length of 100

Respuestas (1)

Star Strider
Star Strider el 29 de Nov. de 2014
Use the zeros and ones funcitons, respectively:
x = zeros(1,100);
y = h*ones(1,100);

La pregunta está cerrada.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by