Community Tip - Your Friends List is a way to easily have access to the community members that you interact with the most! X
Hi All
I enjoy the units features in Mathcad but find not being able to export them to excel or csv files frustrating. Is there a *simple* way to strip units from a mathcad variable array or matrix in preparation for export via WRITECSV for example?
Thanks Much
Bill
Bill Capehart wrote:
Hi All
I enjoy the units features in Mathcad but find not being able to export them to excel or csv files frustrating. Is there a *simple* way to strip units from a mathcad variable array or matrix in preparation for export via WRITECSV for example?
Thanks Much
Bill
Simply divide the variable by its unit.
You may also use the function UnitsOf(variablename) or SIUnitsOf(variablename).
Werner Exinger wrote:
Simply divide the variable by its unit.
You may also use the function UnitsOf(variablename) or SIUnitsOf(variablename).
Excel does it itself
But using the Excel component doesn't export the data to a file.
You could use the output of the component just to strip the units and then write the unitless data via WRITEEXCEl or WRITECSV, but that would be like taking a sledgehammer to crack a nut compared to simply dividing by the unit.
Of course you could double cick the component and manually chose "save file" from within Excel, but that wouldn't be automatic and a bit awkward, too.
So I guess dividing the matrix which should be written to a file by the desired unit will be the best approach.
If you use a matrix with elements of different dimensions in Prime, you will have to vectorize the division.
Remeber to divide by the units you like saved in the Excel spread sheet.