CustomFunctions Plugin Units

CustomFunctions Plugin Units - Does Custom Functions work with units? - Messages

#1 Posted: 12/20/2020 9:19:36 PM
Ryan Freund

Ryan Freund

19 likes in 339 posts.

Group: User

Two questions:

I thought custom functions like Ceil[], round[], etc. worked with units, but there appears to be issues with imperial units. Is that correct?

What is the best/easiest way to find an extension or plugin "page". I couldn't find the extension page for CustomFunctions. I can find a list of registered extensions but it doesn't link to their "page".

Thank!
#2 Posted: 12/21/2020 6:13:11 AM
Davide Carpi

Davide Carpi

1416 likes in 2873 posts.

Group: Moderator

SMath Studio provides automatically an "extension's page" for each plugin (from the hompage click on the ]plug-ins link)

I usually add the link to the forum thread at the top of the "Related resources" section (this is up to each developer since cannot be automated).


2020-12-21 10_15_36-Custom Functions - SMath - Mozilla Firefox.png


About the units, I've not tested them with Imperial units as default, I'll check what can be done.
If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
#3 Posted: 12/22/2020 12:18:35 AM
Ryan Freund

Ryan Freund

19 likes in 339 posts.

Group: User

Thanks for the response. A couple follow up questions.

1. When you say homepage. Are you referring to the en.smath.com/forum or en.smath.com/view/SMathStudio/summary Either way I don't see an "extension page" link.

2. When you say imperial as "default" do you truly mean default? How do I change the default?

3. I have default set to imperial, but if I use a unit in the equation things seem to go array. Here is a photo:

Custom Functions Units.jpg
#4 Posted: 12/22/2020 10:12:49 AM
Davide Carpi

Davide Carpi

1416 likes in 2873 posts.

Group: Moderator

You're welcome,

Wrote

A couple follow up questions.

1. When you say homepage. Are you referring to the en.smath.com/forum or en.smath.com/view/SMathStudio/summary Either way I don't see an "extension page" link.


I mean the landing page of https://smath.com

Wrote

2. When you say imperial as "default" do you truly mean default? How do I change the default?


Yes, Imperial can be the default internal units system; otherwise by default everything is processed and passed to the functions in SI units.
The way to do it is described here f.e., but there are still known issues AFAIK.



Wrote

3. I have default set to imperial, but if I use a unit in the equation things seem to go array. Here is a photo:



39.37in is 1m

This is because the function has 0.034m as input => ceil(0.034m)=1m

If I set the Units System to Imperial, I get 1ft as result, because the function read 0.167ft as input => ceil(0.167ft)=1ft

So it seems that the function works correctly with both the systems, but working with units everything is refered to the base unit (m or ft in this case); if you want to "round" a value associated to a multiple you have to divide by that unit inside the function and multiply again outside.
If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
#5 Posted: 12/30/2020 2:02:24 PM
Ryan Freund

Ryan Freund

19 likes in 339 posts.

Group: User

Davide - thanks again for the Reponses. When I try to go to "https://smath.com" I auto redirect to "https://en.smath.com/view/SMathStudio/summary" so maybe there is a difference.

Here is what I see:
Home Page.jpg

#6 Posted: 12/30/2020 2:03:25 PM
Ryan Freund

Ryan Freund

19 likes in 339 posts.

Group: User

Sorry, nevermind, I found it:

Home Page - Plugin.jpg
  • New Posts New Posts
  • No New Posts No New Posts