How can i create a vector having 6 values between two numbers

Risposte (1)

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]

Categorie

Richiesto:

il 10 Ott 2020

Commentato:

il 11 Ott 2020

Community Treasure Hunt

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

Start Hunting!

Translated by