Click here to Skip to main content
15,884,353 members
Please Sign up or sign in to vote.
2.00/5 (1 vote)
See more:
Dear All,

I am new to matrix solutions in VB. I want to solve a matrix (3x3) in my program written in VB.NET (with matrix addition, multiplication and division). Just simple Matrix like Ax=B, with 3 unknowns. I want to solve that 3 unknowns (x). A and B known. Anyone can suggest a simple method or an simple algorithm to solve this?

Thanks!
Posted
Comments
Sergey Alexandrovich Kryukov 5-Mar-12 3:13am    
There is no such thing as "matrix solutions in VB". And this is not VB, but VB.NET. You can write it by yourself. All you need to know is matrix algebra itself. What's you problem? Matrix representation? Array like double[3,3]. Write it, and ask a question if you face any problems.
--SA
Member 8312096 5-Mar-12 5:36am    
Thanks, Just I want to solve linear equations with 3 unknowns. I can define matrix and feed data or get data from another arrays. Also can do arithmetic operations. But my knowledge is poor to solve linear equations.
Example: I have a matrix like Ax=B. Data for A, x and B matrix come from series of calculations. When I use least square method to solve this matrix, I get three equations like (data are not real)

5x1 + 0 + 10x3 = 1
0 + 10x2 + 0 = 0
10x1 + 0 + 34x3 = 0

my data:

A=[5,0,10,0,10,0,10,0,34]
B=[1,0,0]
x=[x1,x2,x3]

so I want to solve x1, x2 and x3
manual solution is: x1=34/70, x2=0, x3=-10/70

Can you suggest any method?
Thanks!

1 solution

Here[^] you will find library for matrix calculations.
Good luck.
 
Share this answer
 
Comments
Member 8312096 5-Mar-12 5:16am    
I develop my program in VB.NET
Sergey Alexandrovich Kryukov 5-Mar-12 13:14pm    
So what? This is .NET. There is no barriers between these languages. You can reference assembly written in C# in your VB.NET project.
--SA
Member 8312096 5-Mar-12 23:54pm    
Thanks1
Member 8312096 6-Mar-12 22:58pm    
Thanks SAKryukov,
I solved my problem using C# libraries within my VB.NET project. Thanks!
Sergey Alexandrovich Kryukov 7-Mar-12 18:40pm    
You are welcome.
Good luck, call again.
--SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900