| bio | website | |
|---|---|---|
| location | Munich, Germany | |
| age | 35 | |
| visits | member for | 1 year, 3 months |
| seen | 1 hour ago | |
| stats | profile views | 439 |
I work at a small mechanical engineering company, where I develop software and image processing algorithms for camera-based inspection machines.
|
Nov 29 |
comment |
Should 0 * 5ft be 0 or 0ft? 0 times almost anything in Mathematica gives 0. That's exactly the problem. If any dimensionless subexpression becomes 0, Mathematica will throw away all the units and further calculations might fail (although they won't always fail, as you demonstrated). |
|
Nov 29 |
comment |
Should 0 * 5ft be 0 or 0ft? (I think) Rationalizing 0. to 0 works because 0 + _ is automatically simplified to _, but 0. + _ is not. the bug is still there, it's just masked in this special case. |
|
Nov 29 |
comment |
Should 0 * 5ft be 0 or 0ft? @swish: Seems as if AutomaticUnits doesn't work in version 9 any more... I'll probably keep using the built-in Units package |
|
Nov 29 |
comment |
Should 0 * 5ft be 0 or 0ft? Only in this special case. Take UnitConvert[a * startPoint, "Inches"] instead - this will not work for 0 or 0. |
|
Nov 29 |
comment |
Should 0 * 5ft be 0 or 0ft? @swish: I'm actually thinking about using the old package instead of the new quantites. Less verbose and apparently less buggy. But I would have liked the deep integration into plots, calculus and so on. |
|
Nov 29 |
asked | Should 0 * 5ft be 0 or 0ft? |
|
Nov 29 |
comment |
Industrial Level Applications. Recipe for mixed notation of equations set Do you generate the equations in code? If so, it might be more or less straightforward to generate a matrix instead. |
|
Nov 29 |
comment |
Simpler input for the new unit support @MikeHoneychurch: But it isn't integrated into Plots and other Mathematica functionality the way the new units are. What I would like would be input like in Units or AutomaticUnits but combined with the deep integration the new Quantities have. |
|
Nov 29 |
comment |
Industrial Level Applications. Recipe for mixed notation of equations set These equations look automatically generated. Couldn't you just create a matrix/vector and pass them to LinearSolve? |
|
Nov 29 |
comment |
Simpler input for the new unit support @MikeHoneychurch: The built-in older "Units`" package (which I think is based on AutomaticUnits) will simplify 0*Meters to 0 too, but it won't mind adding 0 to another quantity or converting 0 to any other unit. |
|
Nov 29 |
awarded | Nice Question |
|
Nov 28 |
revised |
Simpler input for the new unit support added 767 characters in body |
|
Nov 28 |
comment |
Simpler input for the new unit support It's still not foolproof. For example, the magnitude could be a vector with one component 0 or it could be a variable, that sometimes happens to have the value 0. Ideally, I would like to match any product between an expression and a unit, but I couldn't figure out a way to do that for composite units like m/s^2 |
|
Nov 28 |
revised |
Simpler input for the new unit support added 139 characters in body; edited tags |
|
Nov 28 |
accepted | Unexpected behavior of UnitConvert |
|
Nov 28 |
comment |
Unexpected behavior of UnitConvert You're right. I've restarted the Kernel and now I get the expected result. Should I delete or close the question? |
|
Nov 28 |
revised |
Simpler input for the new unit support Added explanation why WA integration isn't a good solution for me |
|
Nov 28 |
asked | Unexpected behavior of UnitConvert |
|
Nov 28 |
comment |
Simpler input for the new unit support @Rojo: I have no idea how to do that. Could you add your suggestion as an answer? |
|
Nov 28 |
comment |
Simpler input for the new unit support How would you solve the withUnits[UnitConvert[0 m/s^2*(1 min)^2, km]] problem? |