Horizontal Slider: Data-type-Error defining Minimum and Maximum

4 ビュー (過去 30 日間)
Thomas Scheu
Thomas Scheu 2023 年 3 月 9 日
コメント済み: Arka 2023 年 3 月 9 日
Hi,
for my actual GUI project I want to use a "Horizontal Slider" to change a variable value during simulation.
Now my problem: when I enter the value for the Minimum and/or the Maximum by defined variables, I get an error saying: "Enter a scalar numeric value for parameter 'Minimum'". The strange thing is that the right value for the variable is shown on the right side of the box, but is not accepted (see Figure).
How can I enter variables by not getting this error? I defined the minimum as "Minimum = 2000;". When I enter the value "2000" directly (not using the defined variable name), it is working.
Can anybody help me with this problem?

回答 (1 件)

Arka
Arka 2023 年 3 月 9 日
Hi,
The values for Minimum and Maximum need to be finite, real, double, scalar. They cannot be variables.
To learn more about the Horizontal Slider in Simulink, please refer to the MathWorks documentation link below:
  2 件のコメント
Thomas Scheu
Thomas Scheu 2023 年 3 月 9 日
Hi Arka,
thank you very much for your answer.
So, does this mean I have to directly enter the values for Min/Max in the Block Parameters?
Arka
Arka 2023 年 3 月 9 日
Yes, that is correct.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeSimulink についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by