Create a vector with a user inputted increment.

6 次查看(过去 30 天)
Is there an operator like linspace that creates a vector based on a chosen increment? I have to create an array based on 3 inputs, min,max and increment. Say 0,10,3 - I need [0,3,6,9] and for 10,100,37 I need [10,47,84].

采纳的回答

madhan ravi
madhan ravi 2018-11-19
minimum=input('minimum= ')
maximum=input('maximum= ')
increment=input('increment= ')
vector=minimum:increment:maximum;

更多回答(0 个)

类别

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

标签

Community Treasure Hunt

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

Start Hunting!

Translated by