In Simbiology, Is there a way to set a slider with an integer scaling?
조회 수: 1 (최근 30일)
이전 댓글 표시
When you are simulating, you have the option to vary the quantity of either species or of the rate that you already set by dragging it from the Browser section to the Explorer section. The slider automatically appears, you can edit the max and min of the scale but not its units. I want it to increase by a whole numbers and exclude decimals i.e only integers.
댓글 수: 0
답변 (1개)
Arthur Goldsipe
2020년 5월 21일
It is not currently possible to constrain the value of a slider to an integer. It's a great suggestion for a future enhancement, and I'll make sure it gets added to our database of enhancement requests.
In the meantime, I have an idea for a workaround that would allow you to use sliders while still constraining a parameter value to an integer. Let's say that the parameter you want to modify is named kInteger. You can add a new parameter (let's assume it's named kContinuous) that you control by your slider. But then you also add an initial assignment rule kInteger = round(kContinuous) to round the selected value to an integer.
커뮤니티
더 많은 답변 보기: SimBiology Community
참고 항목
카테고리
Help Center 및 File Exchange에서 Scan Parameter Ranges에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!