Create array with same number
581 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Fadal Sasse
am 10 Aug. 2017
Beantwortet: Drue
am 22 Feb. 2023
I have this command z=ones(length(x),1) If I want to change (ones) with 2 or 3 what I should do?
0 Kommentare
Akzeptierte Antwort
James Tursa
am 14 Sep. 2018
Bearbeitet: James Tursa
am 14 Sep. 2018
See this link for a discussion of various methods to do this:
The fastest method seems to be
z = zeros(length(x),1) + 2;
0 Kommentare
Weitere Antworten (2)
Siehe auch
Kategorien
Mehr zu Creating and Concatenating Matrices finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!