I´ve plot a stem trace graph. and dont know why 2 points with the same values (in the y axis) dont be at the same height.
Here a screen shot.
Hope u guys can help me.
See u later.
Please attach your Mathcad Prime worksheet.
Here the link to the file
Dropbox - TESTE PROGRAMA MEF 3.mcdx
The Y axis represent the variable "RM" tha is at the pag 12 and the plot is at pag 14.
Excel file "DADOS EXEMPLO2" is missing.
VladimirN. wrote:
Excel file "DADOS EXEMPLO2" is missing.
I guess we don't really need it.
You could easily duplicate the "problem" - see my post below.
Its sure a numerical inaccuracy.
BTW, the time delay of some hours due to moderation is quite often really annoying.
Johnny sent his file at about way before I replied and had simply to guess what the problem might be, but I just see it now - more than two hours after he posted it.
OK, in this case the file wouldn't have helped as I would not had downloaded it from a dropbox link anyway and additionally chances are that its newer than the Prime version I have
installed here.
@Johnny
You can attach files directly here. At the upper left chose "Use Advanced Editor" and then at the lower right you see "Attach".
Sorry about that. here the excel file.
https://www.dropbox.com/s/rkkwz5f5n7bmabe/DADOS%20EXEMPLO2.xlsx?dl=0
Mathcad have to read just the cells A1 : G18.
Look at the scale on the ordinate!
It seems that internally the two values differ for a very small amount - maybe due to numerical round-off errors.
Set the upper and lower limits on the vertical axis manually and the two stems sure would look like they are of same height.
I did it and it worked!!!
But is there any function tha will do that? I use this file in many different cases and i wouldn't think that define the limits manually are much efficient... Is this a "bug" of the software or something like it?
> But is there any function tha will do that?
A function that will do what? Making values, which are apparently equal perfectly equal? "Round" comes to my mind.
Note the difference in syntax between "round" and "Round".
>I use this file in many different cases and i wouldn't think that define the limits manually are much efficient
Guess normally you won't just plot two values which are close to equal. As soon as you have other values involved Primes autoscaling will automatically do the work.
But be aware that Primes autoscaling usually produces very ugly intervals, so most of the times its necessary to manually change first, second and end value to get a nicer plot. Nicer does not mean nice as the plotting capabilities of Prime unfortunately still are beneath contempt.
> Is this a "bug" of the software or something like it?
No, its not a bug. Its normal behavior when dealing with numerical calculations. Never test if two reals are equal (a=b), always test if the absolute value of their difference is close enough to zero (|a-b|<10^-10).
Our decimal numbers are converted to binaries - then calculations are done and then the result is again converted in our decimal system for display. A lot of possibilities for inaccuracies and round-off errors which naturally occur. The simple number 0,1 is in binary representation periodic. So we have to cut off the number and never are able to store a simple number like 0,1 with perfect precision.
Most software uses IEEE format for storing numbers and using the double precision of this format means you can not expect more than 15 to 16 accurate digits. With every calculation you lose more and more precision.
See the screenshot above - the first time the difference Y(1)-Y(0) should be exactly 2*10^-10 but Mathcad already shows a round-off error.
Here is another example
And here the same calculation in Excel