Question about CheckBox

Question about CheckBox - Mensajes

#1 Publicado: 16/7/2022 16:08:36
Prmtv

Prmtv

0 me gusta en 49 mensajes.

Grupo: 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 happenedArchivo no encontrado.

I tried another way. I changed the formula using inactive check (K=0).Result is good with inactive checkArchivo no encontrado.

But the result bad with active checkArchivo no encontrado.

Question 1: Why did it happen?
Question 2: When inactive check, k=0.How can do k=1 with inactive check?
#2 Publicado: 16/7/2022 16:42:03
overlord

overlord

600 me gusta en 1.381 mensajes.

Grupo: 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,41 KiB) descargado 1238 vez(es).

2022-07-16_22-38.png

Regards
A 1 usuarios les gustó este mensaje
Davide Carpi 17/7/2022 7:10:00
#3 Publicado: 16/7/2022 19:01:44
Prmtv

Prmtv

0 me gusta en 49 mensajes.

Grupo: 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,41 KiB) descargado 1238 vez(es).

2022-07-16_22-38.png

Regards



Great! Thank you very much!!
#4 Publicado: 18/7/2022 13:54:10
Prmtv

Prmtv

0 me gusta en 49 mensajes.

Grupo: 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.
Archivo no encontrado.Archivo no encontrado.


#5 Publicado: 19/7/2022 9:41:51
Jean Giraud

Jean Giraud

983 me gusta en 6.866 mensajes.

Grupo: User

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

Maths checkbox.sm (22,86 KiB) descargado 1252 vez(es).
Maths checkbox DAVIDE.sm (18,66 KiB) descargado 1262 vez(es).
#6 Publicado: 19/7/2022 10:46:20
Jean Giraud

Jean Giraud

983 me gusta en 6.866 mensajes.

Grupo: User

... added User project administrator wrt 'k'

Maths checkbox.sm (15,03 KiB) descargado 1242 vez(es).
#7 Publicado: 19/7/2022 16:05:36
overlord

overlord

600 me gusta en 1.381 mensajes.

Grupo: 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
  • Nuevos mensajes
  • Sin mensajes nuevos