Skydiver

Skydiver - Messages

#1 Posted: 10/26/2024 1:39:57 AM
Valery Ochkov

Valery Ochkov

55 likes in 634 posts.

Group: User

Where is an error?
Skydiver.sm (14 KiB) downloaded 148 time(s).

Must be some plot
Skydiver.png
#2 Posted: 10/26/2024 5:53:11 AM
Alvaro Diaz Falconi

Alvaro Diaz Falconi

1,005 likes in 1,677 posts.

Group: User

Hi Valery. You can't just 'sterilize' the units because coolprops needs them. This could be an approach.

Skydiver.sm (21 KiB) downloaded 142 time(s).

ode.png

Best regards.
Alvaro.
1 users liked this post
Valery Ochkov 10/26/2024 1:01:00 PM
#3 Posted: 10/26/2024 1:02:36 PM
Valery Ochkov

Valery Ochkov

55 likes in 634 posts.

Group: User

Thanks!
But the problem in if
Try please
Skydiver-pv-RT.sm (18 KiB) downloaded 134 time(s).
The parachutist is now falling towards the ground. His parachute won't open. We have to save him!
#4 Posted: 10/26/2024 2:34:18 PM
Valery Ochkov

Valery Ochkov

55 likes in 634 posts.

Group: User

We saved the skydiver!
Skydiver-OK.sm (23 KiB) downloaded 147 time(s).
Skydiver.png

https://yandex.ru/video/preview/420757228716091438
#5 Posted: 10/26/2024 4:54:49 PM
StvMath

StvMath

37 likes in 58 posts.

Group: User

This also works:

Skydiver-OK_b.sm (22 KiB) downloaded 145 time(s).
1 users liked this post
Valery Ochkov 10/26/2024 9:22:00 PM
#6 Posted: 10/26/2024 9:35:34 PM
Valery Ochkov

Valery Ochkov

55 likes in 634 posts.

Group: User

Wrote

This also works:

Skydiver-OK_b.sm (22 KiB) downloaded 145 time(s).


... and this too
Skydiver-OK_c.sm (20 KiB) downloaded 135 time(s).
Skydiver-OK_c.png

#7 Posted: 10/27/2024 12:30:37 PM
Valery Ochkov

Valery Ochkov

55 likes in 634 posts.

Group: User

Why with if we have an error?
Why with cases no an error?
Try please the attach.
Is it some bug?
Skydiver-If-Cases.sm (26 KiB) downloaded 139 time(s).
Skydiver-If-Cases.png

#8 Posted: 10/28/2024 4:39:33 PM
Davide Carpi

Davide Carpi

1,422 likes in 2,876 posts.

Group: Moderator

Wrote

Why with if we have an error?
Why with cases no an error?
Try please the attach.
Is it some bug?



It is probably related to some preprocessing, the function if() is a numerical function and returns an error if the arguments are not defined.

It's the same in integrals, you can't use functions like if() because at some level a preprocessing is required and the function is executed with unknowns as arguments (to retrieve the function from the global context, or some other feature like guessing the unknowns or the units).

cases() works in a different way and you can use for these tasks, but it come at a the cost of not being able to use definitions inside its arguments, because each single case it's not "sealed" from preprocessing by the error that if() throws.

If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
  • New Posts New Posts
  • No New Posts No New Posts