How to initialize a row vector with value zero of size 1xn?
220 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Shubham Maurya
am 19 Feb. 2016
Kommentiert: Khileshwar Rajpuriya
am 30 Apr. 2021
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)
0 Kommentare
Akzeptierte Antwort
jgg
am 19 Feb. 2016
Look up the documentation for the zeros function, which you are using:
A = zeros(1,n);
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Startup and Shutdown finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!