cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Did you know you can set a signature that will be added to all your posts? Set it here! X

Translate the entire conversation x

Matrix Formatting Issue

IA_12699372
10-Marble

Matrix Formatting Issue

To whom this may concern, 

 

Looking for help on how to setup Matrix headers for the attached. 

 

I would like to have a Title above each column for each variable, and the corresponding units shown in the matrix. See remarks in red within the attached. 

 

Many thanks,

Iain 

 

FYI, I use Mathcad Prime 10.0.0.0 

ACCEPTED SOLUTION

Accepted Solutions
Werner_E
25-Diamond I
(To:Werner_E)

In Prime 10 we could also use the Linefeed character #10 to create a multi-line string.

Werner_E_3-1764687446521.png

But as Stuart noted in a thread not that long ago this was broken in Prime 11 and another character code has to be used instead of 10 (I forgot which one).

 

So I guess to be on the safe it might be better to simply use two matrix rows. Which we could get rid of the nasty looking quotation marks:

Werner_E_2-1764687155585.png

 

Prime 10 sheet attached

 

View solution in original post

11 REPLIES 11
Werner_E
25-Diamond I
(To:IA_12699372)

Unfortunately Prime still does not allow to choose units inside of a matrix, so we can't show kN or KN'm inside of the matrix.

We can only change the unit after the matrix in the appropriate place holder, which looks a bit strange

Werner_E_0-1764678599193.png

and also does not allow to add a header line.

 

So the best we can achieve is by stripping the units and adding the unit information in the header:

Werner_E_1-1764678853848.png

 

Another option would be to use an embedded Excel component. Because Excel does not support units you are again forced to display unit-less numbers and name the units in the header, but you have all of Excel's formatting capabilities (like colors, different typefaces, conditional formatting, etc.) at your disposal. You have to decide if the display of some values would justify the effort.

Werner_E_3-1764679716573.png

Prime 10 sheet attached

 

 

StuartBruff
23-Emerald IV
(To:Werner_E)

Does the Prime 11 Custom Units options allow the user to set, say, kN as the base unit?

 

Stuart

Werner_E
25-Diamond I
(To:StuartBruff)


@StuartBruff wrote:

Does the Prime 11 Custom Units options allow the user to set, say, kN as the base unit?

 

Stuart


Yes, custom units in Prime 11 can solve this problem. We can set kN as base unit for force.

It took some time to get the desired kN*m.

The custom units are not very flexible and we can only select the base unit for a dimension from a list of preset units.

To get the kN*m it was necessary to delete the dimension "energy" and add the dimension "torque", where kN*m is offered for selection.

That way we can display the matrix with the desired units and can easily add a header line:

Werner_E_0-1764685033139.png

So once @IA_12699372  updates to Prime 11 or higher, this is an additional way to solve the problem with the added benefit that any force would be displayed in kN and every torque (and also ever energy) value in kN*m without the need to change the unit manually every time.

 

On the other hand, a table with unitless values might be clearer and less confusing to look at anyway.

A compromise might be a nested matrix

Werner_E_0-1764685882098.png

but now after creating it I must confess that I don't like it that much 🙂

 

StuartBruff
23-Emerald IV
(To:Werner_E)

Thanks for that, Werner.  I didn't have enough time with the Prime 11 30-day evaluation period to get around to adequately evaluating(!) units.

 

So far, I think I've seen more reasons to upgrade to Prime 11 than not.

 

Stuart

Werner_E
25-Diamond I
(To:Werner_E)

In Prime 10 we could also use the Linefeed character #10 to create a multi-line string.

Werner_E_3-1764687446521.png

But as Stuart noted in a thread not that long ago this was broken in Prime 11 and another character code has to be used instead of 10 (I forgot which one).

 

So I guess to be on the safe it might be better to simply use two matrix rows. Which we could get rid of the nasty looking quotation marks:

Werner_E_2-1764687155585.png

 

Prime 10 sheet attached

 

Thank you very much Werner_E & Stuart, really helpful. 

StuartBruff
23-Emerald IV
(To:Werner_E)


@Werner_E wrote:

In Prime 10 we could also use the Linefeed character #10 to create a multi-line string.

 

But as Stuart noted in a thread not that long ago this was broken in Prime 11 and another character code has to be used instead of 10 (I forgot which one).


 

Clue: ISTR you mentioning it being the same as one of your (Austrian) emergency telephone numbers.

 

Stuart

Werner_E
25-Diamond I
(To:StuartBruff)


@StuartBruff wrote:

@Werner_E wrote:

In Prime 10 we could also use the Linefeed character #10 to create a multi-line string.

 

But as Stuart noted in a thread not that long ago this was broken in Prime 11 and another character code has to be used instead of 10 (I forgot which one).


 

Clue: ISTR you mentioning it being the same as one of your (Austrian) emergency telephone numbers.

 

Stuart


Ah, yes. Now I remember.

Seems to work in Prime 10 AND Prime 11, but we cannot be sure if it will work OK in future versions. Hopefully PTC will fix the #10 issue.

Werner_E_0-1764693708844.png

 

StuartBruff
23-Emerald IV
(To:Werner_E)


@Werner_E wrote:

@StuartBruff wrote:

Does the Prime 11 Custom Units options allow the user to set, say, kN as the base unit?

 

Stuart


Yes, custom units in Prime 11 can solve this problem. We can set kN as base unit for force.

It took some time to get the desired kN*m.

The custom units are not very flexible and we can only select the base unit for a dimension from a list of preset units.

To get the kN*m it was necessary to delete the dimension "energy" and add the dimension "torque", where kN*m is offered for selection.

That way we can display the matrix with the desired units and can easily add a header line:

 

So once @IA_12699372  updates to Prime 11 or higher, this is an additional way to solve the problem with the added benefit that any force would be displayed in kN and every torque (and also ever energy) value in kN*m without the need to change the unit manually every time.

 

On the other hand, a table with unitless values might be clearer and less confusing to look at anyway.

A compromise might be a nested matrix

 

but now after creating it I must confess that I don't like it that much 🙂


My jury is still out on whether or not the nested array looks OK.  My initial response was the same as yours, but it's growing on me, due to its cleaner, less-cluttered look. It would also be more obvious (I think) if one value had a different unit.

 

My bugbear is taking up needless space.  It's a thought that has crossed my mind before, but I wonder what problems it would cause (conceptually or implementation-wise) if there were an option to place common units at the head of a column, a la Table?

 

Implementing my str2sym/sym2str and formatted strings suggestions would improve the look, as well (eg, the variable name Pmax would convert to the string "Pmax", except that displaying it would (optionally) lose the quote marks.

 

Stuart

 

Werner_E
25-Diamond I
(To:StuartBruff)

Yes, the desire to be able to generate a structure similar to Prime tables from existing data has been raised here in the forum many times. It would certainly be an improvement.

However, I would be delighted if Prime had an equivalent to the data tables in the real Mathcad. These are ideal for storing large amounts of data, which may come from other sources, permanently in a Mathcad file in a space-saving manner.
To do this, however, PTC would first have to change the idiotic way in which cut and paste is implemented. Currently, it is not even possible to copy the data from a larger matrix, as only the currently visible data can be selected. Not to mention the fact that this data is then stored in a format that is unusable for other applications.


But why am I complaining? We already have superscript and subscript functionality in text areas, and in the next version we'll get a handful of selectable background colors and maybe even a second y-axis in the native plots. Things are really moving forward pretty fast!

StuartBruff
23-Emerald IV
(To:Werner_E)


@Werner_E wrote:

Yes, the desire to be able to generate a structure similar to Prime tables from existing data has been raised here in the forum many times. It would certainly be an improvement.

However, I would be delighted if Prime had an equivalent to the data tables in the real Mathcad. These are ideal for storing large amounts of data, which may come from other sources, permanently in a Mathcad file in a space-saving manner.


Agreed.

 


@Werner_E wrote:

To do this, however, PTC would first have to change the idiotic way in which cut and paste is implemented. Currently, it is not even possible to copy the data from a larger matrix, as only the currently visible data can be selected. Not to mention the fact that this data is then stored in a format that is unusable for other applications.


Definitely agreed.  I've been caught out by that a few times, when my expectations for an action don't mesh with the reality.

 


@Werner_E wrote:

But why am I complaining? We already have superscript and subscript functionality in text areas, and in the next version we'll get a handful of selectable background colors and maybe even a second y-axis in the native plots. Things are really moving forward pretty fast!


That's the spirit! 😸

 

 

(I've just been looking back at a few long-standing feature requests, and have determined that Monty Python's song encompasses the only suitable attitude to take)

 

Stuart

Announcements

Top Tags