ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Matrix ANALYSIS (https://www.excelbanter.com/excel-programming/420833-matrix-analysis.html)

filo666

Matrix ANALYSIS
 
I'm trying to solve a system of equations, I have 9 unknowns and 10
equations; the solution of the equation exists depending upon the
coefficients of the equations; for example, If I dont get the solution with
the first 9 equations, I can change one of the original equation with the
tenth equation and look if there is a solution, if not I change another
equation until the solution is found.

My problem is that I can not explain excel how to add two ranges with the
=mdeterm function; for example:

A B C
1 2 3 4
2 1 0 3

=mdeterm(a1:b2) has a solution
I can not jump the B column and still have a range; for instance, this
formula does not work: =mdeterm(a1:a2,c1:c2)
How can I explain excel or the function that it needs to consider the range
jumping whatever number of columns?



Bernard Liengme

Matrix ANALYSIS
 
Let the coefficients of your 10 equations be in A1:J9
The sub below copies the first nine columns to A12:I20
Then it displays the value of MDETERM for the range A12:I20
This is repeated 9 more times with the substitution of the columns 1 thru 9
in turn by column 10 (J1:J9)
In this way you can see which 9 equations to use for the solution

Sub what9()
Range("A1:I9").Copy Destination:=Range("A12")
mydeterm = WorksheetFunction.MDeterm(Range("A12:I20"))
MsgBox mydeterm
For k = 1 To 9
Range("A1:I9").Copy Destination:=Range("A12")
Range("J1:J9").Copy Destination:=Cells(12, k)
mydeterm = WorksheetFunction.MDeterm(Range("A12:I20"))
MsgBox mydeterm
Next k
End Sub

best wishes
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email

"filo666" wrote in message
...
I'm trying to solve a system of equations, I have 9 unknowns and 10
equations; the solution of the equation exists depending upon the
coefficients of the equations; for example, If I don't get the solution
with
the first 9 equations, I can change one of the original equation with the
tenth equation and look if there is a solution, if not I change another
equation until the solution is found.

My problem is that I can not explain excel how to add two ranges with the
=mdeterm function; for example:

A B C
1 2 3 4
2 1 0 3

=mdeterm(a1:b2) has a solution
I can not jump the B column and still have a range; for instance, this
formula does not work: =mdeterm(a1:a2,c1:c2)
How can I explain excel or the function that it needs to consider the
range
jumping whatever number of columns?






All times are GMT +1. The time now is 01:11 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com