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

300 次查看(过去 30 天)
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)

采纳的回答

jgg
jgg 2016-2-19
Look up the documentation for the zeros function, which you are using:
A = zeros(1,n);

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Startup and Shutdown 的更多信息

标签

产品

Community Treasure Hunt

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

Start Hunting!

Translated by