Question about CheckBox

Question about CheckBox - Messages

#1 Posted: 2022/7/16 16:08:36
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: 2022/7/16 16:42:03
overlord

overlord

580 likes in 1,348 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.41 KiB) downloaded 663 time(s).

2022-07-16_22-38.png

Regards
1 users liked this post
Davide Carpi 2022/7/17 07:10:00
#3 Posted: 2022/7/16 19:01:44
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.41 KiB) downloaded 663 time(s).

2022-07-16_22-38.png

Regards



Great! Thank you very much!!
#4 Posted: 2022/7/18 13:54:10
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: 2022/7/19 09:41:51
Jean Giraud

Jean Giraud

983 likes in 6,866 posts.

Group: User

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

Maths checkbox.sm (22.86 KiB) downloaded 693 time(s).
Maths checkbox DAVIDE.sm (18.66 KiB) downloaded 702 time(s).
#6 Posted: 2022/7/19 10:46:20
Jean Giraud

Jean Giraud

983 likes in 6,866 posts.

Group: User

... added User project administrator wrt 'k'

Maths checkbox.sm (15.03 KiB) downloaded 662 time(s).
#7 Posted: 2022/7/19 16:05:36
overlord

overlord

580 likes in 1,348 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
  • No New Posts