Question about CheckBox

Question about CheckBox - Messages

#1 Posted: 7/16/2022 4:08:36 PM
Prmtv

Prmtv

0 likes in 49 posts.

Group: 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 happenedFile not found.

I tried another way. I changed the formula using inactive check (K=0).Result is good with inactive checkFile not found.

But the result bad with active checkFile not found.

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

overlord

551 likes in 1332 posts.

Group: 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 KiB) downloaded 31 time(s).

2022-07-16_22-38.png

Regards
1 users liked this post
Davide Carpi 7/17/2022 7:10:00 AM
#3 Posted: 7/16/2022 7:01:44 PM
Prmtv

Prmtv

0 likes in 49 posts.

Group: 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 KiB) downloaded 31 time(s).

2022-07-16_22-38.png

Regards



Great! Thank you very much!!
#4 Posted: 7/18/2022 1:54:10 PM
Prmtv

Prmtv

0 likes in 49 posts.

Group: 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.
File not found.File not found.


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

Jean Giraud

983 likes in 6866 posts.

Group: User

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

Maths checkbox.sm (22 KiB) downloaded 28 time(s).
Maths checkbox DAVIDE.sm (18 KiB) downloaded 32 time(s).
#6 Posted: 7/19/2022 10:46:20 AM
Jean Giraud

Jean Giraud

983 likes in 6866 posts.

Group: User

... added User project administrator wrt 'k'

Maths checkbox.sm (15 KiB) downloaded 23 time(s).
#7 Posted: 7/19/2022 4:05:36 PM
overlord

overlord

551 likes in 1332 posts.

Group: 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
  • New Posts New Posts
  • No New Posts No New Posts