SMath Studio Forum
»
SMath Studio
»
Questions
»
Removing units from a result / variable
Rank: Newbie
Groups: Registered
Joined: 21/01/2020(UTC) Posts: 6
|
Hi all!
Maybe this is a stupid question, but I'm just starting with SMath.
I searched also in forums but didn't find a similar topic..
I perform my calculations in SMath using always units, very interesting and useful. But now I need just the number, the value without units. What I do now is just dividing it by '1' and the unit XD
Any other method or function more professional? :P
Thanks a lot!
Zigor
|
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 15/04/2012(UTC) Posts: 1,986 Was thanked: 1124 time(s) in 721 post(s)
|
Originally Posted by: zigoreto Hi all!
Maybe this is a stupid question, but I'm just starting with SMath.
I searched also in forums but didn't find a similar topic..
I perform my calculations in SMath using always units, very interesting and useful. But now I need just the number, the value without units. What I do now is just dividing it by '1' and the unit XD
In fact, this is the only professional way to do it, because this way you can control and display the unit to be used. Just suppressing the unit would force the reader to make assumptions on what unit has been used to derive the numerical value. The experienced reader knows that always base units are used (e.g. for plotting) but it is better to explicitly specify them. |
|
|
|
|
Rank: Newbie
Groups: Registered
Joined: 21/01/2020(UTC) Posts: 6
|
Thanks, Martin.. It's exactly the way I work. But now I want to export data to an Excel sheet, and afterwards to treat that data as numbers without unit (Excel works like that).. so instead removing the unit in Excel, I was just wondering if in SMath would be a function to do it before exporting Best regards, Zigor
|
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 15/04/2012(UTC) Posts: 1,986 Was thanked: 1124 time(s) in 721 post(s)
|
Assuming you have a table with columnwise uniform units, then the following approach provides full control: exportdata.sm (5kb) downloaded 19 time(s). |
|
1 user thanked mkraska for this useful post.
|
|
|
Rank: Guest
Groups: Registered
Joined: 04/07/2015(UTC) Posts: 6,866 Was thanked: 981 time(s) in 809 post(s)
|
Originally Posted by: zigoreto I perform my calculations in SMath using always units, That is incoherent with unitless maths. 1. It can't be QA whereas the unit system sub-processes. 2. Advanced maths [symbolic, solvers ..] don't take units. ... I'm immune to "thunder" from contradictory comments ! Engineering formulas are already given in corresponding units [SI , ...]
|
|
|
|
Rank: Guest
Groups: Registered
Joined: 04/07/2015(UTC) Posts: 6,866 Was thanked: 981 time(s) in 809 post(s)
|
Originally Posted by: Jean Giraud Engineering formulas are already given in corresponding units [SI , ...] ... or construct wrt the units you want. ... export table w/o header Inst_Colebrook Pipe Data.sm (62kb) downloaded 35 time(s).
|
|
|
|
Rank: Guest
Groups: Registered
Joined: 04/07/2015(UTC) Posts: 6,866 Was thanked: 981 time(s) in 809 post(s)
|
|
|
|
|
SMath Studio Forum
»
SMath Studio
»
Questions
»
Removing units from a result / variable
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.