What is the difference between linspace and the colon operator in this code?
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Timo Kuchheuser
am 12 Nov. 2017
Kommentiert: Timo Kuchheuser
am 12 Nov. 2017
Hi! What is the difference between the linspace function and the colon operator in this code?
v1 = (0:1/200:1);
v2 = linspace(0,1,200);
>> v1==v2
Matrix dimensions must agree.
Why is there one element more in v1 than in v2?
Thank you very much Timo
0 Kommentare
Akzeptierte Antwort
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Creating and Concatenating Matrices 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!