Adding elements between 2 values

7 次查看(过去 30 天)
Hello MATLAB community,
Is there a way to add elements between 2 values, lets say 1 and 2, of our own choice? For example, how can I create a vector that starts from 1, ends at 2 and has 99 other elements of equal increaments between 1 and 2?
Thank you

采纳的回答

KSSV
KSSV 2020-9-4
编辑:KSSV 2020-9-4
iwant = linspace(1,2,99)
Also
n = 99 ;
dx = (2-1)/(n-1) ;
x = 1:dx:2 ;

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Logical 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by