Rank: Advanced Member Groups: Registered
Joined: 25/09/2013(UTC) Posts: 325 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!
|
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 15/04/2012(UTC) Posts: 1,988 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". |
|
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 25/09/2013(UTC) Posts: 325 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.
|
|
|
|
Rank: Administration Groups: Registered, Advanced Member Joined: 23/06/2009(UTC) Posts: 1,740 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!" |
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 15/04/2012(UTC) Posts: 1,988 Was thanked: 1126 time(s) in 723 post(s)
|
Originally Posted by: RFreund 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. |
|
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 25/09/2013(UTC) Posts: 325 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!
|
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 15/04/2012(UTC) Posts: 1,988 Was thanked: 1126 time(s) in 723 post(s)
|
Originally Posted by: RFreund 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. |
|
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 25/09/2013(UTC) Posts: 325 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.