Question about CheckBox

Question about CheckBox - Сообщения

#1 Опубликовано: 16.07.2022 16:08:36
Prmtv

Prmtv

0 сообщений из 49 понравились пользователям.

Группа: User

Hello. Important coefficient k=1.25. Sometimes you need to use it, sometimes you don't need to use it.I decided to take CheckBox. Here's what happenedФайл не найден.

I tried another way. I changed the formula using inactive check (K=0).Result is good with inactive checkФайл не найден.

But the result bad with active checkФайл не найден.

Question 1: Why did it happen?
Question 2: When inactive check, k=0.How can do k=1 with inactive check?
#2 Опубликовано: 16.07.2022 16:42:03
overlord

overlord

551 сообщений из 1332 понравились пользователям.

Группа: Moderator

Wrote

Question 1: Why did it happen?
Question 2: When inactive check, k=0.How can do k=1 with inactive check?


Answer 1: It is a long lasted bug/limitation.
SMath Viewer doesn't respect your decimal places in Smath Studio.
I had reported it 6 years ago, maybe it can't be fixable as it is.
https://en.smath.com/forum/yaf_postsm35182_SMath-Studio-0-98-6077--21-August-2016.aspx#post35182
However, you can round your results as you wish.

2022-07-16_22-29.png

Answer 2: What I understood from your desire is;
If checkbox is active, then result should be matrix value.
If checkbox is inactive, then result should be 1.
You can do that with an if/else statement.

questions.sm (4 КиБ) скачан 33 раз(а).

2022-07-16_22-38.png

Regards
1 пользователям понравился этот пост
Davide Carpi 17.07.2022 07:10:00
#3 Опубликовано: 16.07.2022 19:01:44
Prmtv

Prmtv

0 сообщений из 49 понравились пользователям.

Группа: User

Wrote

Wrote

Question 1: Why did it happen?
Question 2: When inactive check, k=0.How can do k=1 with inactive check?


Answer 1: It is a long lasted bug/limitation.
SMath Viewer doesn't respect your decimal places in Smath Studio.
I had reported it 6 years ago, maybe it can't be fixable as it is.
https://en.smath.com/forum/yaf_postsm35182_SMath-Studio-0-98-6077--21-August-2016.aspx#post35182
However, you can round your results as you wish.

2022-07-16_22-29.png

Answer 2: What I understood from your desire is;
If checkbox is active, then result should be matrix value.
If checkbox is inactive, then result should be 1.
You can do that with an if/else statement.

questions.sm (4 КиБ) скачан 33 раз(а).

2022-07-16_22-38.png

Regards



Great! Thank you very much!!
#4 Опубликовано: 18.07.2022 13:54:10
Prmtv

Prmtv

0 сообщений из 49 понравились пользователям.

Группа: User

Wrote

Wrote

Question 1: Why did it happen?
Question 2: When inactive check, k=0.How can do k=1 with inactive check?


Answer 1: It is a long lasted bug/limitation.

Answer 2: What I understood from your desire is;
If checkbox is active, then result should be matrix value.
If checkbox is inactive, then result should be 1.
You can do that with an if/else statement.



When adding units, the result has changed. When checkbox is inactive, everything is fine. When checkbox is active, units disappear.
Файл не найден.Файл не найден.


#5 Опубликовано: 19.07.2022 09:41:51
Jean Giraud

Jean Giraud

983 сообщений из 6866 понравились пользователям.

Группа: User

1. your example
2. Davide Carpi tutorial 8 years ago.
Cheers ... Jean.

Maths checkbox.sm (22 КиБ) скачан 29 раз(а).
Maths checkbox DAVIDE.sm (18 КиБ) скачан 32 раз(а).
#6 Опубликовано: 19.07.2022 10:46:20
Jean Giraud

Jean Giraud

983 сообщений из 6866 понравились пользователям.

Группа: User

... added User project administrator wrt 'k'

Maths checkbox.sm (15 КиБ) скачан 27 раз(а).
#7 Опубликовано: 19.07.2022 16:05:36
overlord

overlord

551 сообщений из 1332 понравились пользователям.

Группа: Moderator

Wrote

When adding units, the result has changed. When checkbox is inactive, everything is fine. When checkbox is active, units disappear.


If you have noticed, when checkbox is selected k is in vector and look like k=[1.25]
Alter the if/else statement as below.

Regards

screenshot.PNG
  • Новые сообщения Новые сообщения
  • Нет новых сообщений Нет новых сообщений