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

7-Bedrock

## Wilson Theta Method with Matrix

About a week ago the following people have been help me with programming from translating Matlab into Mathcad on Wilson Theta Method, Werner, FM and Jamie. Now that the problem is solved, I'm trying to read in matrices Mass matrix, Stiffness matrix, Damping matrix and an external force vector into the function but get comfused with the n by n matrix into the function. Would any member of the community please see what I'm doing wrong and help me the code is below the function. I have followed Werner's work on previous worksheet. If I get this to work my goal is to solve the problem below the function on dynamic analysis for foundations. Please attached.

4 REPLIES 4

I don't have the time to dig into it in more depth, so just a loose collection of observations.

• In Matlab there seems to be a function with four input matrices and four output vectors. I would implement as a function in Mathcad, too.
• You initialize u,an,v as square matrices but you need and treat them later as simple vectors - that causes syntax error
• The section "% Initial conditions" from the Matlab program seems to be missing in your implementation
• The expression (R-R) in the Matlab code looks strange. This would just be a vector with all zeros. So apart from that R is used in the (missing) initial conditions it has no further influence on the calculation.

Good luck!

7-Bedrock
(To:Werner_E)

Good Morning Werner,

You are correct, I missed the initial conditions. I have modified the function to include the initial condition. Also, I do not know how the author came about the (theta*(R-R)) in the equation. I checking my numerical analysis text on the topic to find out. My main problem is do I need two for loop or one for the matrix?. Please help.

Best Regards,

Boyer

As you see you get an error because the various array dimensions don't match.

You define u for example as a 301 x 301 matrix. The Maltlab code defines the corresponding disp as a 2 x 301 matrix and seems to anly use the first row of it. Not sure whats going on here. Guess u etc. can be just vectors.

7-Bedrock
(To:Werner_E)

Good Morning Werner / Mathcad Community,

Please attached a copy of the revised Mathcad file on the same topic. I have two different seperate functions. The modified copy of your file, and the second is the one that I created. I still have problem making one of the function to work. Please see attached and see if you could help this time.

Announcements