Create a range of values ​​of the desired length

2 Ansichten (letzte 30 Tage)
Lev Mihailov
Lev Mihailov am 15 Jun. 2022
Beantwortet: KSSV am 15 Jun. 2022
There is a range of values ​​from 16 to 42, I need to get 8 values ​​in an equal interval. Is there a function in matlab for this?
Thanks in advance

Akzeptierte Antwort

KSSV am 15 Jun. 2022
iwant = linspace(16,42,8)
iwant = 1×8
16.0000 19.7143 23.4286 27.1429 30.8571 34.5714 38.2857 42.0000

Weitere Antworten (0)


Mehr zu Get Started with MATLAB 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!

Translated by