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

Matrix In Mathca Prime

SOLVED

Matrix In Mathca Prime

Dear everyone,

Please solve this in Attachment Picture

Step1
How to Auto-create Matrix with nxn ?

Step2 

Put  Matrix provide in Step 1 by Column and Rows User Instruct.

Many thank

PC-9.png

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Matrix In Mathca Prime

Here's a function that does what you want in one go. It creates the empty matrix (rows and columns as provided by the first parameter Size), and puts each of the elements of the provided matrix (second parameter  Data) on the respective column and row node positions (as specified by the third and fourth parameters Cnodes and Rnodes respectively). LM_20180327_PutElements.png

You'll have to type the function in Prime yourself, since I'm limited to Prime express.

But I can view your Prime sheets, so if you need more help, just come back here.

 

Success!

Luc

View solution in original post

13 REPLIES 13

Re: Matrix In Mathca Prime

One way

Mij.png

Re: Matrix In Mathca Prime

Hi,

 

autoCreating an nxn matrix.  

Just set the last element to zero.

Watch the value of ORIGIN which will change the outcome.

File enclosed to demonstrate this.

Re: Matrix In Mathca Prime

Hi,

 

Here is how to do the insertion you asked for.

File enclosed

Re: Matrix In Mathca Prime

Here's a function that does what you want in one go. It creates the empty matrix (rows and columns as provided by the first parameter Size), and puts each of the elements of the provided matrix (second parameter  Data) on the respective column and row node positions (as specified by the third and fourth parameters Cnodes and Rnodes respectively). LM_20180327_PutElements.png

You'll have to type the function in Prime yourself, since I'm limited to Prime express.

But I can view your Prime sheets, so if you need more help, just come back here.

 

Success!

Luc

View solution in original post

Re: Matrix In Mathca Prime

Ok 👍
It seems work, I will try in Prime

Re: Matrix In Mathca Prime


@LucMeekes wrote:

Here's a function that does what you want in one go. It creates the empty matrix (rows and columns as provided by the first parameter Size), and puts each of the elements of the provided matrix (second parameter  Data) on the respective column and row node positions (as specified by the third and fourth parameters Cnodes and Rnodes respectively). LM_20180327_PutElements.png

You'll have to type the function in Prime yourself, since I'm limited to Prime express.

But I can view your Prime sheets, so if you need more help, just come back here.

 

Success!

Luc


After I did your Formula in Prime, show as below+Attachment

PC-10.png

Re: Matrix In Mathca Prime

Stupid error message of Prime, you're not using units here !

I guess the error is due to the autolabelling feature of Prime, Sometimes a blessing, Now it isn't.

 LM_20180327_PutElementsPrime.png

 

Check your labels. ORIGIN should always be the same ORIGIN, the bold upright one, which is labelled as a 'system' type. So the Italic ORIGIN's need their labels changed.

 

Success!
Luc

Re: Matrix In Mathca Prime

hahaha......Smiley Very Happy
Wrong 'c', The origin is Correct!
Cheer! Success 

Re: Matrix In Mathca Prime

So now it works?