Borrar filtros
Borrar filtros

How to initialize a row vector with value zero of size 1xn?

112 visualizaciones (últimos 30 días)
Say, I have a row vector A having n elements. I want to make all elements zero.
  • For e.g., in 2-d, we write A=zeros(n)

Respuesta aceptada

jgg
jgg el 19 de Feb. de 2016
Look up the documentation for the zeros function, which you are using:
A = zeros(1,n);

Más respuestas (0)

Categorías

Más información sobre Get Started with MATLAB en Help Center y File Exchange.

Etiquetas

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by