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

297 ビュー (過去 30 日間)
Shubham Maurya
Shubham Maurya 2016 年 2 月 19 日
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 Center および File ExchangeStartup and Shutdown についてさらに検索

タグ

製品

Community Treasure Hunt

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

Start Hunting!

Translated by