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

Calculating matrices with a a set of numbers in an array

Newbie

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
Highlighted

Re: Calculating matrices with a a set of numbers in an array

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.

 

 

Highlighted

Re: Calculating matrices with a a set of numbers in an array

Here is what I was talking about

Werner_E_0-1579563698569.png

MC15 worksheet attached

 

 

Announcements