Welcome Guest! To enable all features please Login. New Registrations are disabled.

Notification

Icon
Error

Login


5 Pages123>»
Options
Go to last post Go to first unread
Offline Andrey Ivashov  
#1 Posted : 25 February 2010 15:37:37(UTC)
Andrey Ivashov


Rank: Administration

Groups: Developers, Registered, Knovel Developers, Administrators, Advanced Member
Joined: 11/07/2008(UTC)
Posts: 1,616
Man
Russian Federation

Was thanked: 1978 time(s) in 666 post(s)
Hello.

Good news for people, who have requested implementation of Units to the SMath Studio. Here is screenshot of what I have for today:


P.S.: Biggrinancing:

Wanna join the discussion?! Login to your SMath Studio Forum forum account. New Registrations are disabled.

Offline omorr  
#2 Posted : 25 February 2010 18:05:32(UTC)
omorr


Rank: Administration

Groups: Registered, Advanced Member
Joined: 23/06/2009(UTC)
Posts: 1,740
Man
Serbia

Was thanked: 318 time(s) in 268 post(s)
Hello Andrey,

As we know, Units are very often mentioned on this forum. This is rather appreciated from all of us Thank you
BTW, you mentioned that units will be in Italic to distinguish them from the variables. How would that be implemented? What do you think to put them in a different color as well, by default? Just curious.

Regards,
Radovan
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
Offline Andrey Ivashov  
#3 Posted : 25 February 2010 19:12:35(UTC)
Andrey Ivashov


Rank: Administration

Groups: Developers, Registered, Knovel Developers, Administrators, Advanced Member
Joined: 11/07/2008(UTC)
Posts: 1,616
Man
Russian Federation

Was thanked: 1978 time(s) in 666 post(s)
omorr wrote:
How would that be implemented?

Good question Good My logic was simple: SMath Studio is math-oriented program, so

  1. Math symbols (digits, constants/variables, functions, operators, brackets) should have an ability to be inserted just by pressing the keyboard buttons. As is.
  2. Text strings should be different entries type. To insert text user should specify the type first... using " (quotation marks) symbol. It is rather predictable.
  3. Unit entry is not math symbol and is not a text, so user should also specify a type. I propose to use ' (apostrophe) symbol as a solution of this problem.

So, when user presses an apostrophe, programs placeholder will change its form to filled black oval (standard form is filled black rectangle) and SMath Studio will show Dynamic Assistance list with defined units. User should write own unit or choose one from the shown list. It is simple enough. I know, that Mathcad users knows ' symbol as a shortcut to insert brackets, but... my goal is not to remake the Mathcad, really Wink

omorr wrote:
What do you think to put them in a different color as well, by default?

The second good question. In truth, I don't know. And what do you think? Actually italic font is a temporary thing. The final implementation still can be different. So, I really need in the comments from users.

Questions to all:
  1. Is it OK, that units will be presented italic?
  2. Is it OK, that units will be shown blue (f.e.) colored?
  3. Is there any standard for using units in, maybe, books?

Edited by user 25 February 2010 19:20:00(UTC)  | Reason: Not specified

Offline omorr  
#4 Posted : 25 February 2010 19:42:27(UTC)
omorr


Rank: Administration

Groups: Registered, Advanced Member
Joined: 23/06/2009(UTC)
Posts: 1,740
Man
Serbia

Was thanked: 318 time(s) in 268 post(s)
smath wrote:
1. Is it OK, that units will be presented italic?

It is Ok with me, as long as the units and superscripts does not overlap and might look ugly.
smath wrote:
2. Is it OK, that units will be shown blue (f.e.) colored?

It is also Ok with me. I hope that the default color might be changed. If not, the blue color will be fine.
smath wrote:
3. Is there any standard for using units in, maybe, books?

I do not know, but most of the publishers want units in italic but I can not say it is a standard.

Regards,
Radovan
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
Offline Andrey Ivashov  
#5 Posted : 25 February 2010 19:55:00(UTC)
Andrey Ivashov


Rank: Administration

Groups: Developers, Registered, Knovel Developers, Administrators, Advanced Member
Joined: 11/07/2008(UTC)
Posts: 1,616
Man
Russian Federation

Was thanked: 1978 time(s) in 666 post(s)
Thank you.

I've found this link: http://physics.nist.gov/cuu/Units/checklist.html.
Offline omorr  
#6 Posted : 25 February 2010 20:21:41(UTC)
omorr


Rank: Administration

Groups: Registered, Advanced Member
Joined: 23/06/2009(UTC)
Posts: 1,740
Man
Serbia

Was thanked: 318 time(s) in 268 post(s)
smath wrote:
Thank you.

I've found this link: http://physics.nist.gov/cuu/Units/checklist.html.

It seems I was wrong. As I understood, the NIST described that variables should bi Italic and variables in Roman type. To be honest, we all know how LaTeX prepared Math texts look like. As I've been using Mathcad for such a long time, Italic variables look very ugly in Mathcad, therefore I never use Italic in Mathcad. The SMath Courier like fonts are much nicer. Moreover, Italic in SMath look very good.

Regards,
Radovan

Edited by user 25 February 2010 21:08:25(UTC)  | Reason: Not specified

When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
Offline jakobg  
#7 Posted : 26 February 2010 13:11:51(UTC)
jakobg


Rank: Member

Groups: Registered
Joined: 20/03/2009(UTC)
Posts: 21
Man
Location: Vienna, AUSTRIA

Units are a very nice feature indeed, Andrey!

Following the last discussion, I would agree that units should be distinguishable (colored !), especially during the writing and working phase.
But maybe for printing a more restrained look (just italic, but black) would be useful.
Maybe, my very first post, regarding a Latex export capability may become interesting when publishing features grow attention.

Jakob
Offline tsgrue  
#8 Posted : 27 February 2010 21:11:09(UTC)
tsgrue

Rank: Newbie

Groups: Registered
Joined: 25/08/2009(UTC)
Posts: 3
Location: North Carolina (USA)

Awesome, excellent, fantastic!

Thanks very much!!!


Clap

Offline Andrey Ivashov  
#9 Posted : 27 February 2010 21:48:51(UTC)
Andrey Ivashov


Rank: Administration

Groups: Developers, Registered, Knovel Developers, Administrators, Advanced Member
Joined: 11/07/2008(UTC)
Posts: 1,616
Man
Russian Federation

Was thanked: 1978 time(s) in 666 post(s)
Just few notes.

SMath Studio will support Units inside matrix/vector/array even if items will be presented with different units.


Even if user will not know about how to insert Units (using ampersand symbol on start), Dynamic Assistance will show all available units as well as variables and functions in drop-down list.


Regards.
Offline omorr  
#10 Posted : 27 February 2010 22:44:01(UTC)
omorr


Rank: Administration

Groups: Registered, Advanced Member
Joined: 23/06/2009(UTC)
Posts: 1,740
Man
Serbia

Was thanked: 318 time(s) in 268 post(s)
Hello Andrey,

Could you please let us know how the things are going on regarding to units conversion. How would that be implemented (say, displaying the value in "cm" not in "m" )?
Just curious.

Regards,
Radovan

Edited by user 27 February 2010 22:50:13(UTC)  | Reason: Not specified

When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
Offline Andrey Ivashov  
#11 Posted : 28 February 2010 00:17:08(UTC)
Andrey Ivashov


Rank: Administration

Groups: Developers, Registered, Knovel Developers, Administrators, Advanced Member
Joined: 11/07/2008(UTC)
Posts: 1,616
Man
Russian Federation

Was thanked: 1978 time(s) in 666 post(s)
Sure.

For now, I cannot find the way more convenient then MathSoft done. My plan was to make first release of Units without an ability for user to operate with result (results will be always presented with base units)... it depends on my time availability. Hope you'll understand it.

Regards.
Offline omorr  
#12 Posted : 28 February 2010 01:16:08(UTC)
omorr


Rank: Administration

Groups: Registered, Advanced Member
Joined: 23/06/2009(UTC)
Posts: 1,740
Man
Serbia

Was thanked: 318 time(s) in 268 post(s)
I understand Andrey, of course Good . You are right, Mathcad has quite good unit conversion features. As far sa I am concerned, it would be quite enough if you could implement the ability to, say, devide the variables with the appropriate units and to obtain the numerical value:

a:=1m

b:=a/cm

b=100

If not, never mind - some other time .

Reards,
Radovan

Edited by user 28 February 2010 01:19:46(UTC)  | Reason: Not specified

When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
Offline Andrey Ivashov  
#13 Posted : 28 February 2010 05:47:45(UTC)
Andrey Ivashov


Rank: Administration

Groups: Developers, Registered, Knovel Developers, Administrators, Advanced Member
Joined: 11/07/2008(UTC)
Posts: 1,616
Man
Russian Federation

Was thanked: 1978 time(s) in 666 post(s)
Yeah, it will work.

Offline omorr  
#14 Posted : 28 February 2010 17:06:22(UTC)
omorr


Rank: Administration

Groups: Registered, Advanced Member
Joined: 23/06/2009(UTC)
Posts: 1,740
Man
Serbia

Was thanked: 318 time(s) in 268 post(s)
Thanks Andrey Good

It is very good. Also, I am convinced that everyone will agree that units in different color is much more acceptable.

I think that we can assume that there would be no problem to have unit variables as function arguments. Moreover, I hope that plotting with them will also be possible. On the basis of your screenshots I suppose that we could manage that, couldn't we?

Regards,
Radovan
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
Offline Andrey Ivashov  
#15 Posted : 28 February 2010 20:14:08(UTC)
Andrey Ivashov


Rank: Administration

Groups: Developers, Registered, Knovel Developers, Administrators, Advanced Member
Joined: 11/07/2008(UTC)
Posts: 1,616
Man
Russian Federation

Was thanked: 1978 time(s) in 666 post(s)


Do you mean this? By the way, I don't know why, but Mathcad can plot the second graph...
Offline omorr  
#16 Posted : 28 February 2010 22:13:23(UTC)
omorr


Rank: Administration

Groups: Registered, Advanced Member
Joined: 23/06/2009(UTC)
Posts: 1,740
Man
Serbia

Was thanked: 318 time(s) in 268 post(s)
Yes, this is strange. It seems that this is due to Mathcad feature to mix units and numbers in symbolic calculation, when you use g(1.2kg)-> simbolicaly you will get the result with units in it (numericaly will be wrong). Afterwards, when you want to plot the function, Mathcad converts all the units in base units and, after that, gives them unity value (one) and you can plot this. BTW, working with units in Mathcad can be sometimes confusing because of this and proone to errors. One must be careful about it and I made many mistakes considering this.

For instance:
f(x):=x^2*m+10 will convert into f(x)->x^2*1+10
g(x):=x^2*cm+10 will convert into g(x)->x^2*0.01+10

This might be questinable because you can plot x versus y even in this way (with the expression with units which do not match - expresion with inconsistent units)??? Therefore I asked about divison by the desired unit because of the x,y axis on plots or other variables. This way you can have the numerical (dimensionless) values in the desired units on plots.

Regards,
Radovan

PS. From my experience with Mathcad, working with units is quite safe when this includes basic algebraic operators. If using some special functions (numerical...), plotting etc. which include units, extracare is needed. The safest way is to work without units first, and put them afterwards.

Edited by user 01 March 2010 03:33:41(UTC)  | Reason: Not specified

When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
Offline Edwin  
#17 Posted : 03 March 2010 04:15:24(UTC)
Edwin


Rank: Member

Groups: Registered
Joined: 25/10/2009(UTC)
Posts: 12
Location: The Netherlands

Terrific job on the units so far! I'm looking forward to using it. The only thing that seems to be missing is the extra input field for the output value (which isn't actually a unit field in mathcad, it can contain anything. Apparently mathcad just does a symbolic division and outputs that before the field. Very effective though).

As for the graphs. Seems logical that the second one wouldn't work. The fact that is does is probably a testament to the horrible way mathcad seems to handle units in graphs. All you want it to do is input your range in the proper units and have it output the axis values in the units of your choice. But that never worked and it always had weird side effects. (Disclaimer: I never used any mathcad beyond version 9 (=2000) )

My answers to your questions:
1. Italic is fine. Maybe not the way it should be, but it's good to be able to recognise the difference.
2. Blue looks nice for input purposes because it makes units stand out really well. But for printing I would prefer black.
3. You seem to have found the formal layout rules yourself. They may not be practical though because doing math symbols in Times/Italic will probably require larger font sizes to keep them easily readable. It would of course be nice for printing or work on a high resolution desktop. Maybe a style implementation would be nice somewhere down the line.

Offline Andrey Ivashov  
#18 Posted : 03 March 2010 06:38:08(UTC)
Andrey Ivashov


Rank: Administration

Groups: Developers, Registered, Knovel Developers, Administrators, Advanced Member
Joined: 11/07/2008(UTC)
Posts: 1,616
Man
Russian Federation

Was thanked: 1978 time(s) in 666 post(s)
Edwin, hello! Do you talk about this:



P.S.: omorr, I did it! Yahoo

Edited by user 03 March 2010 06:49:44(UTC)  | Reason: Not specified

Offline omorr  
#19 Posted : 03 March 2010 13:11:54(UTC)
omorr


Rank: Administration

Groups: Registered, Advanced Member
Joined: 23/06/2009(UTC)
Posts: 1,740
Man
Serbia

Was thanked: 318 time(s) in 268 post(s)
Andrey,

All my credits to you Victory Thank you Good
You did a great job. I hope it would not be to shameless from me Blush to mention just one more thing. What about the temperature relative scales (Celsius, Fahrenheit)?

Regards,
Radovan

Edited by user 03 March 2010 13:19:16(UTC)  | Reason: Not specified

When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
Offline maweilian  
#20 Posted : 03 March 2010 21:16:12(UTC)
maweilian


Rank: Advanced Member

Groups: Registered
Joined: 09/01/2010(UTC)
Posts: 102
Man
United States
Location: Oregon, USA

Was thanked: 5 time(s) in 5 post(s)
Andrey, the unit implementation looks great! I can't wait to try out the beta version. Congratulations on your good work.
Will Massie
Mechanical Engineer
Oregon, USA
Users browsing this topic
Similar Topics
Units implementation (Project discussion)
by Andrey Ivashov 25/02/2010 15:37:37(UTC)
5 Pages123>»
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.