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

Community Tip - If community subscription notifications are filling up your inbox you can set up a daily digest and get all your notifications in a single email. X

Solving for variable in equation where all variables are matrices

DL_12518856
2-Explorer

Solving for variable in equation where all variables are matrices

Hello,

 

I am attempting to set up a sheet to calculate the allowable stress due to live load for 27 different vehicles. I have an equation (see screenshot) where all variables except one have been defined into matrices. I need to figure out a way to iteratively solve for fcLL for each of the 27 different loads given the other defined inputs. I've tried using a solve block and I've tried using root() but I haven't quite figured out how to use these to solve for a system of matrices. The number of rows for each matrix is static and won't likely change, but the number of columns is dynamic based on earlier inputs. For this example, I have three columns of data.


I have Mathcad Prime 10.0.0.0 and I've uploaded a simplified worksheet (so nobody would have to peruse 40+ pages to get to the example in question).

 

Please help - I am not married to any particular method and am admittedly very new to Mathcad. I welcome any input!

1 REPLY 1
Werner_E
25-Diamond I
(To:DL_12518856)

You wrote that you have an equation, but in your sheet an inequality is seen. That means that for any given set of inputs the solution is not unique but rather an infinite range of values.

 

You write that you want to solve for f,cDL, but this variable is defined as 1x3 matrix already. Maybe you mean to solve for f.cLL wich is used in your expression but never defined.

 

There seem to be two typos:

You define variable F.b' but use variable F.b in your expression

You define variable F.cLL' but use F.c.LL* (additional dot) in your expression

 

I fixed the typos as I thought would be reasonable, turned your inequality into an equation and set up a function using normal scalar input values to solve it for f.cLL.

Then we can use this function to call it for every combination of input data.

It can be done by using worksheet ranges or programmed for loops (I prefer the latter)

Werner_E_1-1733245418391.png

 

If you like using vectorization you could also do it in one of the two ways shown below

Werner_E_2-1733245943100.png

 

Prime 10 sheet attached

Announcements

Top Tags