Community Tip - You can subscribe to a forum, label or individual post and receive email notifications when someone posts a new topic or reply. Learn more! X
Would someone please help me with setting the document tol so that very small values in the matrix show as zero? Thanks
Solved! Go to Solution.
Ah, true, I'd forgotten that (if I ever knew it). Surprisingly, I did notice the change in M10 random number functions to go unitless, so rolled my own to replace the new built-in functions and extend them to the complex domain, but that's a story for another day.
An alternative to applying functions conventionally to a value is to use them as units.
Here's a unit tolerant version of a function I'd created earlier ("Worksheets are written, Never meaning to send", as the old song went - and still goes).
This would have been a lot easier if I hadn't been deprived of my partial function application capability.
And I'm still waiting for Mathcad's Unicode set to be extended to U+1xxxx, then I wouldn't have to cheat when I wanted mildly_annoyed≔"👿".
Yes, I could have written round like your version, but I wanted to inspect the units and do some manipulation of them in another worksheet, and didn't feel like rewriting the function. As you might be aware from your early-bird copy of my Expression Type Functions worksheet, I've got a variant of SIUnitsOf that (actually!) handles arbitrarily-deeply nested arrays with mixed units.
Stuart
Change equation format.
Adding to Tetsuro's result, ...
Stuart
Unfortunately "round" can only be used with unitless arguments.
An alternative could be "Round" (note the capital "R")
We could turn this method into a small utility fuction
We could also use "round" in this way
Nonetheless its awkward and the formatting options we had in real Mathcad, especially complex and zero tolerance in this case, are sorely missed 😞
Ah, true, I'd forgotten that (if I ever knew it). Surprisingly, I did notice the change in M10 random number functions to go unitless, so rolled my own to replace the new built-in functions and extend them to the complex domain, but that's a story for another day.
An alternative to applying functions conventionally to a value is to use them as units.
Here's a unit tolerant version of a function I'd created earlier ("Worksheets are written, Never meaning to send", as the old song went - and still goes).
This would have been a lot easier if I hadn't been deprived of my partial function application capability.
And I'm still waiting for Mathcad's Unicode set to be extended to U+1xxxx, then I wouldn't have to cheat when I wanted mildly_annoyed≔"👿".
Yes, I could have written round like your version, but I wanted to inspect the units and do some manipulation of them in another worksheet, and didn't feel like rewriting the function. As you might be aware from your early-bird copy of my Expression Type Functions worksheet, I've got a variant of SIUnitsOf that (actually!) handles arbitrarily-deeply nested arrays with mixed units.
Stuart
Thank you Stuart.
I'm afraid the thanks are a little premature. I overlooked the fact that local assignment is a programming functionality.
I think this is a Mathcad Prime Express-friendly version of round.
Stuart
Thank you Werner_E.