Question about CheckBox

Question about CheckBox - Poruke

#1 Objavljeno: 16. 7. 2022. 16:08:36
Prmtv

Prmtv

0 svidjanja u 49 postova.

Grupa: 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 happenedFajl nije pronađen.

I tried another way. I changed the formula using inactive check (K=0).Result is good with inactive checkFajl nije pronađen.

But the result bad with active checkFajl nije pronađen.

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

overlord

601 svidjanja u 1.382 postova.

Grupa: 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) preuzeto 1287 put(ova).

2022-07-16_22-38.png

Regards
1 korisnika je svidelo ovu objavu
Davide Carpi 17. 7. 2022. 07:10:00
#3 Objavljeno: 16. 7. 2022. 19:01:44
Prmtv

Prmtv

0 svidjanja u 49 postova.

Grupa: 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) preuzeto 1287 put(ova).

2022-07-16_22-38.png

Regards



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

Prmtv

0 svidjanja u 49 postova.

Grupa: 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.
Fajl nije pronađen.Fajl nije pronađen.


#5 Objavljeno: 19. 7. 2022. 09:41:51
Jean Giraud

Jean Giraud

983 svidjanja u 6.866 postova.

Grupa: User

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

Maths checkbox.sm (22,86 KiB) preuzeto 1319 put(ova).
Maths checkbox DAVIDE.sm (18,66 KiB) preuzeto 1311 put(ova).
#6 Objavljeno: 19. 7. 2022. 10:46:20
Jean Giraud

Jean Giraud

983 svidjanja u 6.866 postova.

Grupa: User

... added User project administrator wrt 'k'

Maths checkbox.sm (15,03 KiB) preuzeto 1292 put(ova).
#7 Objavljeno: 19. 7. 2022. 16:05:36
overlord

overlord

601 svidjanja u 1.382 postova.

Grupa: 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
  • Novi postovi
  • Nema novih postova