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

Notification

Icon
Error

Login


Options
Go to last post Go to first unread
Offline RFreund  
#1 Posted : 26 March 2014 15:54:50(UTC)
RFreund


Rank: Advanced Member

Groups: Registered
Joined: 25/09/2013(UTC)
Posts: 325
United States
Location: IL

Was thanked: 19 time(s) in 17 post(s)
I see in the smath examples, specifically I'm looking at the portable version reference book (very helpful by the way), the variables are in blue color and are not "normal" variables. What is the difference and how do you use these?

Thanks!

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

Offline mkraska  
#2 Posted : 26 March 2014 21:53:39(UTC)
mkraska


Rank: Advanced Member

Groups: Registered
Joined: 15/04/2012(UTC)
Posts: 1,988
Germany

Was thanked: 1126 time(s) in 723 post(s)
The blue variables are units, see the handbook page "Units of Measurement"> "Units in Results Display".
Martin Kraska

Pre-configured portable distribution of SMath Studio: https://smath.com/wiki/SMath_with_Plugins.ashx
Offline RFreund  
#3 Posted : 28 March 2014 21:53:45(UTC)
RFreund


Rank: Advanced Member

Groups: Registered
Joined: 25/09/2013(UTC)
Posts: 325
United States
Location: IL

Was thanked: 19 time(s) in 17 post(s)
Thanks for the response. I think I am referring to something different though.

In the handbook if you go to Examples-> Bending of a beam. l.0 and q.0 are blue. They are not "normal" variables because if I type l.0= It returns nothing. However if I copy and set this variable equal to something then I receive a result.
Offline omorr  
#4 Posted : 28 March 2014 22:31:47(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,

Those are "units like" variables - starting with apostrophe.
Here is a simple example

Regards,
Radovan
omorr attached the following image(s):
nutsbolts.png
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
Offline mkraska  
#5 Posted : 28 March 2014 22:37:28(UTC)
mkraska


Rank: Advanced Member

Groups: Registered
Joined: 15/04/2012(UTC)
Posts: 1,988
Germany

Was thanked: 1126 time(s) in 723 post(s)
Originally Posted by: RFreund Go to Quoted Post
Thanks for the response. I think I am referring to something different though.

In the handbook if you go to Examples-> Bending of a beam. l.0 and q.0 are blue. They are not "normal" variables because if I type l.0= It returns nothing. However if I copy and set this variable equal to something then I receive a result.

Not really different. The blue variables are just custom units. This was my standard way to parametrize my sheets before I could use Maxima for symbolics. The benefit is that you can do plots and numerical simplification with such variables.

In Maxima, these variables should be assumed to be positive. This, however, does not work currently. Thus, I have to add the command Maxima(assume('l.0>0))=
Then the sheet works fine.
File Attachment(s):
example maxima beam.sm (36kb) downloaded 52 time(s).
Martin Kraska

Pre-configured portable distribution of SMath Studio: https://smath.com/wiki/SMath_with_Plugins.ashx
Offline RFreund  
#6 Posted : 29 March 2014 01:15:34(UTC)
RFreund


Rank: Advanced Member

Groups: Registered
Joined: 25/09/2013(UTC)
Posts: 325
United States
Location: IL

Was thanked: 19 time(s) in 17 post(s)
Some day the thanks button will work for me... but thank you.

Quote:
The benefit is that you can do plots and numerical simplification with such variables.


Can you possibly elaborate on this? Why is it possible with only these variables? You had other variables, well I take that back I suppose the only other variable that was "normal" was x however all your equations were functions of x. Which is acceptable to smath, I suppose? Using Maxima though none of that would matter, you could use "normal" variables?

Thanks again!
Offline mkraska  
#7 Posted : 29 March 2014 02:15:59(UTC)
mkraska


Rank: Advanced Member

Groups: Registered
Joined: 15/04/2012(UTC)
Posts: 1,988
Germany

Was thanked: 1126 time(s) in 723 post(s)
Originally Posted by: RFreund Go to Quoted Post
Some day the thanks button will work for me... but thank you.

Quote:
The benefit is that you can do plots and numerical simplification with such variables.


Can you possibly elaborate on this? Why is it possible with only these variables? You had other variables, well I take that back I suppose the only other variable that was "normal" was x however all your equations were functions of x. Which is acceptable to smath, I suppose? Using Maxima though none of that would matter, you could use "normal" variables?

Thanks again!


OK, I try to describe what I understand so far. In SMath, expressions containing undefined variables, cannot evaluated numerically, nor can they be plotted (except for x in plots). For plotting and numerical evaluation, any unit is converted to the base unit of the corresponding quantity and this base unit is replaced by 1. Custom units are base units of their own as long as they are undefined.

In Maxima, this difference does not matter. In evaluation, always symbolic results are generated, which eventually can be evaluated numerically by SMath. You always see the original Maxima result if you set Optimization> None. Some symbolic operations in Maxima depend on assumptions if a variable is positive or real. You can declare such properties, but not all operations and in particular not the simplifier care about these assumptions.

Sometimes, Maxima asks the user for added information, which in most cases is plainly annoying. E.g. Maxima allows you to have the upper integration limit being less than the lower limit, thereby reversing the domain. That might be funny for the math people, most engineers do not see any benefit in such flexiblity. In order to mitigate that, the plugin automatically responds to such questions with "pos" and issues a message that such an assumption has been made. That allows the user to suppress the question by an explicit assumption. See the Maxima test suite in the interactive handbook (Plugins> Maxima> Maxima Test (the link is at the end of the page).

The plugin tells Maxima to handle units just like other variables, but always assumed to be positive, that seems a little broken at the moment. Sometimes bug fixes and new features in the plugin have side effects which are not immediately recognized, because of the limited variety of test examples in the test suite. We would need a fully blown regression test over all existing SMath sheets with Maxima commands in them, but we don't have, unfortunately. The closest approximation to such a test is the test suite mentioned above, which contains screenshots for comparison with the expected result.
Martin Kraska

Pre-configured portable distribution of SMath Studio: https://smath.com/wiki/SMath_with_Plugins.ashx
Offline RFreund  
#8 Posted : 31 March 2014 17:46:19(UTC)
RFreund


Rank: Advanced Member

Groups: Registered
Joined: 25/09/2013(UTC)
Posts: 325
United States
Location: IL

Was thanked: 19 time(s) in 17 post(s)
Thank you!
Users browsing this topic
Guest
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.