In Simbiology, Is there a way to set a slider with an integer scaling?

2 次查看(过去 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.

回答(1 个)

Arthur Goldsipe
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 CenterFile Exchange 中查找有关 Import Data 的更多信息

产品


版本

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by