Create a vector with a user inputted increment.
조회 수: 7 (최근 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].
댓글 수: 0
채택된 답변
madhan ravi
2018년 11월 19일
minimum=input('minimum= ')
maximum=input('maximum= ')
increment=input('increment= ')
vector=minimum:increment:maximum;
추가 답변 (0개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!