![RFreund RFreund](/forum/images/noavatar.gif) ![](/forum/Images/Ranks/Advanced-Member.png) Rank: Advanced Member Groups: Registered
Joined: 25/09/2013(UTC) Posts: 325 ![United States United States](/forum/Content/images/flags/US.png) 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!
|
|
|
|
![mkraska mkraska](/forum/images/noavatar.gif) ![](/forum/Images/Ranks/Advanced-Member.png) Rank: Advanced Member Groups: Registered
Joined: 15/04/2012(UTC) Posts: 1,990 ![Germany Germany](/forum/Content/images/flags/DE.png) Was thanked: 1128 time(s) in 724 post(s)
|
The blue variables are units, see the handbook page "Units of Measurement"> "Units in Results Display". |
|
|
|
|
![RFreund RFreund](/forum/images/noavatar.gif) ![](/forum/Images/Ranks/Advanced-Member.png) Rank: Advanced Member Groups: Registered
Joined: 25/09/2013(UTC) Posts: 325 ![United States United States](/forum/Content/images/flags/US.png) 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.
|
|
|
|
![omorr omorr](/forum/resource.ashx?u=274) ![](/forum/Images/Ranks/Administration.png) Rank: Administration Groups: Registered, Advanced Member Joined: 23/06/2009(UTC) Posts: 1,740 ![Man Man](/forum/Themes/yafvision/male.gif) ![Serbia Serbia](/forum/Content/images/flags/SP.png) 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): |
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!" |
|
|
|
![mkraska mkraska](/forum/images/noavatar.gif) ![](/forum/Images/Ranks/Advanced-Member.png) Rank: Advanced Member Groups: Registered
Joined: 15/04/2012(UTC) Posts: 1,990 ![Germany Germany](/forum/Content/images/flags/DE.png) Was thanked: 1128 time(s) in 724 post(s)
|
Originally Posted by: RFreund ![Go to Quoted Post Go to Quoted Post](/forum/Themes/yafvision/icon_latest_reply.gif) 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. |
|
|
|
|
![RFreund RFreund](/forum/images/noavatar.gif) ![](/forum/Images/Ranks/Advanced-Member.png) Rank: Advanced Member Groups: Registered
Joined: 25/09/2013(UTC) Posts: 325 ![United States United States](/forum/Content/images/flags/US.png) 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!
|
|
|
|
![mkraska mkraska](/forum/images/noavatar.gif) ![](/forum/Images/Ranks/Advanced-Member.png) Rank: Advanced Member Groups: Registered
Joined: 15/04/2012(UTC) Posts: 1,990 ![Germany Germany](/forum/Content/images/flags/DE.png) Was thanked: 1128 time(s) in 724 post(s)
|
Originally Posted by: RFreund ![Go to Quoted Post Go to Quoted Post](/forum/Themes/yafvision/icon_latest_reply.gif) 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. |
|
|
|
|
![RFreund RFreund](/forum/images/noavatar.gif) ![](/forum/Images/Ranks/Advanced-Member.png) Rank: Advanced Member Groups: Registered
Joined: 25/09/2013(UTC) Posts: 325 ![United States United States](/forum/Content/images/flags/US.png) Location: IL Was thanked: 19 time(s) in 17 post(s)
|
|
|
|
|
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.