1 Pages (3 items)
Bug in implementation of Matrices - Messages
#1 Posted: 12/1/2016 1:50:20 PM
[Version: 0.97 (Build: 5346), portable version]
Hi, Friends:
I'm seeing a bug in SMath's implementation of matrices...or at least column matrices...or at least in my use of them. Refer to the embedded image below.
On the left-hand side of the image is a MathCad calculation. On the right-hand side is the equivalent SMath calculation. At the top of the Mathcad worksheet, I defined MW to be "MegaWatts" so that I could produce a unit equivalent to SMath's "MW". Notice that these two worksheets track identically until one gets to the output value for Power. The Mathcad result differs from the SMath result. In the three bottom lines of the SMath worksheet, I essentially verify that the Mathcad worksheet contains the correct values. I did this by entering the velocity values individually, rather than as elements of a matrix.
I first noticed that there was a problem when I produced a similar SMath worksheet for a different assignment. On that assignment, I changed the top value of the matrix, and observed all three values of the output matrix changed! This shouldn't have happened. Only the top value of the output matrix should have changed. If you would like to recreate the very simple SMath worksheet shown on the right side above, you can observe that problem for yourself.
Thanks very much! (And SMath is still a great product!) ---Tom Nally

Hi, Friends:
I'm seeing a bug in SMath's implementation of matrices...or at least column matrices...or at least in my use of them. Refer to the embedded image below.
On the left-hand side of the image is a MathCad calculation. On the right-hand side is the equivalent SMath calculation. At the top of the Mathcad worksheet, I defined MW to be "MegaWatts" so that I could produce a unit equivalent to SMath's "MW". Notice that these two worksheets track identically until one gets to the output value for Power. The Mathcad result differs from the SMath result. In the three bottom lines of the SMath worksheet, I essentially verify that the Mathcad worksheet contains the correct values. I did this by entering the velocity values individually, rather than as elements of a matrix.
I first noticed that there was a problem when I produced a similar SMath worksheet for a different assignment. On that assignment, I changed the top value of the matrix, and observed all three values of the output matrix changed! This shouldn't have happened. Only the top value of the output matrix should have changed. If you would like to recreate the very simple SMath worksheet shown on the right side above, you can observe that problem for yourself.
Thanks very much! (And SMath is still a great product!) ---Tom Nally
#2 Posted: 12/1/2016 2:20:23 PM
what was your intention when doing v^3? From perspective of matrix operations it is equivalent to v*v*v which dot product of v & v times v.
What you want to use is vectorize(v^3), which will apply ^3 to each element of v.
VDOT.sm (7 KiB) downloaded 39 time(s).
P.S.: Once you learn SMath, mathcad feels awkward (but faster in some cases).
What you want to use is vectorize(v^3), which will apply ^3 to each element of v.
VDOT.sm (7 KiB) downloaded 39 time(s).
P.S.: Once you learn SMath, mathcad feels awkward (but faster in some cases).
3 users liked this post
Steelweaver52 12/1/2016 3:53:00 PM, frapuano 12/1/2016 4:35:00 PM, Davide Carpi 12/1/2016 9:01:00 PM
#3 Posted: 12/1/2016 8:48:59 PM
Your Smath & Mathcad are both wrong.
If it can help: read more =>
Inst_Wind Mill.sm (310 KiB) downloaded 47 time(s).
If it can help: read more =>
Inst_Wind Mill.sm (310 KiB) downloaded 47 time(s).
1 Pages (3 items)
-
New Posts
-
No New Posts