How can i create a vector having 6 values between two numbers
Ältere Kommentare anzeigen
How can i create a vector having 6 values between 2 and 12 including the end points 2 and 12?
Antworten (1)
Sindar
am 10 Okt. 2020
Assuming you want them evenly spaced:
x = linspace(2,12,6);
If you want them randomly spaced
x = [2 ; 2+(12-2)*rand(4,1) ; 12]
1 Kommentar
Amjed Bakhsh
am 11 Okt. 2020
Kategorien
Mehr zu Creating and Concatenating Matrices finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!