have to create a matlab counter [duplicate]

浪尽此生 提交于 2019-12-20 07:56:15

问题


Q- Create a "counter" from 0:limit-1 (for example if you choose 3 it will display 0,1,2). The length of counter is not determined in the program and it should be determined when it is being run and the inputs can differ from each other


回答1:


not really sure what you mean...but

for i = 0:limit-1
    disp(i)
end

will display 0,1,2 ... limit-1



来源:https://stackoverflow.com/questions/16477924/have-to-create-a-matlab-counter

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!