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

Community Tip - Have a PTC product question you need answered fast? Chances are someone has asked it before. Learn about the community search. X

matrix analysis

SFares
12-Amethyst

matrix analysis

Hello,

on the left side of my mathcad sheet is a pdf copy past shots. on the right side i am trying to follow the same steps. please scroll down to the red arrow. i am not sure why the results on the right side does not match what is the screen shot on the left side for Ke1,Ke2,Ke3. the other two red arrows are below. Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions
Werner_E
24-Ruby V
(To:SFares)

The problems are twofold.

The easy one is that you used the literal index instead of the vector index for the stiffness matrices Ke[1, etc.

The real problem was that an expression is interpreted differently by the numeric and the symbolic processor and therefor the sheet would still not run. Obviously the pdf shows a Mathcad 11 (or below) file where a dfífferent symbolic engine was implemented in Mathcad (Maple).

The expression creates a 2-dimensional matrix using three range variables, which is quite unsusual, to say the least. Nevertheless either an error message should pop up, telling us that this is not allowed or both, the numeric and the symbolic engine, should create the very same matrix, which they don't do.

So I call this a bug!

The numerics create the correct 3x4 matrix while the symbolics just creates a 3x3 matrix.

I am not sure know how an expression with three ranges is supposed to work (best guess is like three nested for-loops) but it looks like the symbolics is missing the case j=2 and k=0.

I created an expression which uses just two ranges and does (hopefully) the same.

Anybody an explanation for this effect and/or a less cumbersome solution?

1.png

2.png

EDIT: Here is an alternative for the creation of the matrix "top" using a program with three nested loops. Its more obvious here that it does the same as the original expression:

[Sorry! Can't embed the screenshot. Whenever I try I end up with the same picture as above showing and not the one I selected to embed :-(]

3.png

Now on the last try it worked 🙂

View solution in original post

3 REPLIES 3
Werner_E
24-Ruby V
(To:SFares)

The problems are twofold.

The easy one is that you used the literal index instead of the vector index for the stiffness matrices Ke[1, etc.

The real problem was that an expression is interpreted differently by the numeric and the symbolic processor and therefor the sheet would still not run. Obviously the pdf shows a Mathcad 11 (or below) file where a dfífferent symbolic engine was implemented in Mathcad (Maple).

The expression creates a 2-dimensional matrix using three range variables, which is quite unsusual, to say the least. Nevertheless either an error message should pop up, telling us that this is not allowed or both, the numeric and the symbolic engine, should create the very same matrix, which they don't do.

So I call this a bug!

The numerics create the correct 3x4 matrix while the symbolics just creates a 3x3 matrix.

I am not sure know how an expression with three ranges is supposed to work (best guess is like three nested for-loops) but it looks like the symbolics is missing the case j=2 and k=0.

I created an expression which uses just two ranges and does (hopefully) the same.

Anybody an explanation for this effect and/or a less cumbersome solution?

1.png

2.png

EDIT: Here is an alternative for the creation of the matrix "top" using a program with three nested loops. Its more obvious here that it does the same as the original expression:

[Sorry! Can't embed the screenshot. Whenever I try I end up with the same picture as above showing and not the one I selected to embed :-(]

3.png

Now on the last try it worked 🙂

SFares
12-Amethyst
(To:Werner_E)

Thank you so much Werner!

what i dont quite understand is the formula in "top " , t.ie,n_free.j-k..... how does this formula gives the result for "top" 3x4 matrix. could you show me how for example how are some of the values in the "top" matrix is calaculated based on the formula for t.ie,n_free.j-k?. i did not originally write the expression in pdf.Thanks!

Werner_E
24-Ruby V
(To:SFares)

sameer fares wrote:

Thank you so much Werner!

what i dont quite understand is the formula in "top " , t.ie,n_free.j-k..... how does this formula gives the result for "top" 3x4 matrix. c

You mean my second approach with the three nested loops (the red one in the pic)?

I simply used the same formula as used in the pdf. The pdf used three range variables to do the looping and this makes the "new" symbolics (muPad) choke. So I simply rewrote it using explicit loops (the ranges ie, j, k are obsolete now).

The first approach (yellow) using mod and trunc was a bit tricky, but with the second approach it should be obvious that the very same as in the original file is done.

Top Tags