How to create a for loop in function with a step size as input?
显示 更早的评论
My current function is:
. .

.
x is supposely to run from 765 to 805 with myself individually keying in the step size
X Eg. 765 -> 770 -> 775 -> 780 .... (step size: 5)
765 -> 767 -> 769 -> 771 .... (step size:2)
.
.
.
765 -> 765.1 -> 765.2 -> 765.3 (step size:0.1)
.
is repetitive procedure.
So Im thinking of changing X as the input of step size and 765 to 805 already implemented in the function. But Im foreign to the command of for loop.
Anyone can help? Will greatly appreciate it! Thanks!
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Loops and Conditional Statements 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!