Problems with sum(1) - Messages
Also, the complaint of "a not defined" doesn't make sense, when the numeric value after dividing the result by the unit is pure numeric.
sum1.sm (8 KiB) downloaded 55 time(s).
But ... (always there are one but)
Finally, units are assumed as reals, even it could be remains undefined:
sum1.sm (14 KiB) downloaded 50 time(s).
Best regards.
Alvaro.
WroteHi Martin. "a" is not assumed as complex, like in maple, thus don't populate across dot products. (I remember some comment from Andrey about that somewhere). You need to use vectorize.
At times I forget the survival rule "don't trust symbolic evaluation"... Too bad that it is the default.
If undefined variables were assumed to be non-scalar, then simplifying (a*b ) *c to a*b*c would be illegal.
I am aware of using units as an enabler of universal happiness. Yet,usually they are pre-occupied in an un-clearable way with some content, which makes it awkward to use them as symbolic variables. That's why I use 'a.0 instead of just 'a in the above example.
It is a pain to explain these things to students.
Worksheet3.sm (9 KiB) downloaded 58 time(s).
Wrote
At times I forget the survival rule "don't trust symbolic evaluation"... Too bad that it is the default.
Good rule, annotated.
Wrote
I am aware of using units as an enabler of universal happiness.
I agree that the existence theorem for that statement is true, but I sincerely hope that the uniqueness theorem is not.
Here a workaround:
As explanation for your students try to show that in other languages you need to introduce another operator for vectorial (or matricial and tensorial) products: https://reference.wolfram.com/language/ref/Dot.html . In mathematica Dot operator is {a}.{b}, not {a}*{b}. Also in old maple versions, whith linalg, you need to call evalm (eval for matrices) for actually do matrix operations.
Best regards.
Alvaro.
Wrote
As explanation for your students try to show that in other languages you need to introduce another operator for vectorial (or matricial and tensorial) products: https://reference.wolfram.com/language/ref/Dot.html . In mathematica Dot operator is {a}.{b}, not {a}*{b}. Also in old maple versions, whith linalg, you need to call evalm (eval for matrices) for actually do matrix operations.
Best regards.
Alvaro.
Are you aware of any programming language which produces the same rubbish (the above (a*b)*c example) without warning?
I present SMath Studio to the students as a means for performing and documenting engineering calculations. I try to avoid problems which I would not have without SMath Studio.
Yet, some problems can't be avoided, as they are related to physical understanding, just like the units of temperature and change of temperature or the difference between angular velocity and frequency.
Wrote
Are you aware of any programming language which produces the same rubbish (the above (a*b)*c example) without warning?
Nope.
Wrote
I present SMath Studio to the students as a means for performing and documenting engineering calculations. I try to avoid problems which I would not have without SMath Studio.
Yet, some problems can't be avoided, as they are related to physical understanding, just like the units of temperature and change of temperature or the difference between angular velocity and frequency.
Me too. It's I was pointing out how matrix and vector products handle mathematics and maple just to indicate that it is probably not possible to implement them without introducing a different notation than the one used for the product between two scalars, real or complex. And point that out to the students. And I think I did not explain very well why I pointed out why I made those notes.
It is incredible how many errors can be seen in experienced engineers (let alone students) because they have done some simple calculations in excel or some other software, including matlab and mathematica (maple seems to be more reluctant to allow very silly errors) just for mixing unconverted units, getting mixed up with parentheses in simple but long expressions, making a mistake in some sign or many other causes. Well, I must confess that I include myself among those who do not trust the calculations I have done in Excel ... well, add matlab. Mathematica is complicated enough to prevent me from making silly mistakes, it just lets me make less noticeable mistakes.
And you are absolutely right to point out that it is really a shame that SMath has such errors.
I also use the rule: Don't trust linear algebra calculations in SMath (numeric or symbolic):
It is sometimes difficult to justify using a program that miscalculates the rank of a matrix only filled with ones and zeros.
Best regards.
Alvaro.
Wrote
yes, this is another workaround just like using units or the vectorize function. Unfortunately, all not obvious for unexperienced users.
the algebra of the project may not be commutative.
2D rotation, 3D rotation, Cholesky polyfit ...
Poly 0 Read First Edu.sm (37 KiB) downloaded 56 time(s).
-
New Posts
-
No New Posts