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

Copy multiple elements in matrix

SER4
5-Regular Member

Copy multiple elements in matrix

I'm making a thread calculator.  In order to check whether user input returns a 'typical/standard thread combination' or not (e.g. UNC, UNF, etc.), I want to have a master check list matrix, probably with a vhlookup.

SER4_0-1626979991304.png

I'm lazy and don't feel like copying EACH element NaN...is there no way to select a bunch and copy it into the next row/column?

I can copy multiple entries and paste a nested into one entry location, but not copy them over into multiple elements.

I've seen a couple threads about using functions to make an empty matrix, but I can't quite figure it out...and really I'd probably want to make a filled matrix, and then manually edit some elements.

1 ACCEPTED SOLUTION

Accepted Solutions
LucMeekes
23-Emerald I
(To:SER4)

You can use either function to create the matrix of desired size, and fill(ed) with an arbitrary value (replace NaN with any value you like). Then you evaluate the matrix (M=      or N=)

Then you should be able to copy the matrix created to the definition of a new one. After that you can delete the matrix creation and its evaluation and work on the definition of your matrix: changing some NaN's to another value.

 

But there's another option as well. You can keep the matrix creation and additionally set the desired matrix elements to a value of your desire. If you keep that in a collapsed area, you have the whole thing documented:

LucMeekes_0-1626988528293.png

And, before I forget. The simplest method to create a matrix with Rows rows and Columns columns is:

LucMeekes_1-1626988733512.png

(That is:

- If the Matrix M didn't exist already, or, if it did exist, was smaller in both dimensions.

- If you've not changed ORIGIN from its default value, otherwise ORIGIN can only be 1, and you omit both "-1" in the creation.)

 

Success!
Luc

View solution in original post

3 REPLIES 3
LucMeekes
23-Emerald I
(To:SER4)

Two possible options come to mind easily.

1.

LucMeekes_0-1626983535896.png

2. (much simpler)

LucMeekes_1-1626983574809.png

Prime4 file attached.

 

Success!
Luc

SER4
5-Regular Member
(To:LucMeekes)

OK that's pretty cool, but now how do I go and manually edit "random" specific entries...I'd like to do it directly in the "table" (matrix), just because it's easier to visualize.

Honestly it looks like I'm just going to have to mash the Ctrl+C & Ctrl+V buttons, which I guess is fine cuz I really only have to do this once forever.

 

Just seems like we should be able to select multiple (rows and/or columns) of entries and paste them somewhere else...similar to inside Microsoft Word tables / Excel Spreadsheets.

LucMeekes
23-Emerald I
(To:SER4)

You can use either function to create the matrix of desired size, and fill(ed) with an arbitrary value (replace NaN with any value you like). Then you evaluate the matrix (M=      or N=)

Then you should be able to copy the matrix created to the definition of a new one. After that you can delete the matrix creation and its evaluation and work on the definition of your matrix: changing some NaN's to another value.

 

But there's another option as well. You can keep the matrix creation and additionally set the desired matrix elements to a value of your desire. If you keep that in a collapsed area, you have the whole thing documented:

LucMeekes_0-1626988528293.png

And, before I forget. The simplest method to create a matrix with Rows rows and Columns columns is:

LucMeekes_1-1626988733512.png

(That is:

- If the Matrix M didn't exist already, or, if it did exist, was smaller in both dimensions.

- If you've not changed ORIGIN from its default value, otherwise ORIGIN can only be 1, and you omit both "-1" in the creation.)

 

Success!
Luc

View solution in original post

Announcements
Check out the latest
Mathcad Tip
"PTC Mathcad 15 / Prime 1-6 Update."