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

Community Tip - You can change your system assigned username to something more personal in your community settings. X

Calculating matrices with a a set of numbers in an array

MarioH
3-Visitor

Calculating matrices with a a set of numbers in an array

Hello,

 

I tried to calculate a matrices with a matrix that includes a variable with a set of numbers. 

Putting an array instead of a constant number ( Vbat -->M1,1)  to the matrix the solver tells the error

"This variable is undefined". Is it possible like I tried or is there another solution to calculate the

same matrix again and again in an loop and set different given values, how to extract the results?

I found some examples but I don´t know how to transfer to my problem.

 

Thank you 

2 REPLIES 2
Werner_E
24-Ruby V
(To:MarioH)

Even for a single value of M[1,1 your solve block yield 7 equations for just 6 variables. So usually no solution can be found.

You may use the "minerr" command instead of "find" or do without a solve block and use the "lsolve" command.

Werner_E_0-1579563107600.png

If that solves your problem, you may turn the solve block or the lsolve into a function of M[1,1 and call that function vectorized to get a nested vector of solutions.

 

 

Here is what I was talking about

Werner_E_0-1579563698569.png

MC15 worksheet attached

 

 

Top Tags