Can VB be used to efficiently find determinants of 4 x 4 matrices?

In summary, the conversation is about creating a program in Visual Basic to find the determinant of a 4 x 4 matrix. One person is struggling with using arrays and the other suggests using nested "For Loops" and hard coding the array. They also reference a previous thread where they discussed a similar topic.
  • #1
Shahil
117
19
hey,

:eek:

I want to use Visual Basic to create a programme that finds the determinant of a 4 x 4 matrix. I have some code and an idea how to do it but the process doesn't use arrays and is bloody long and doesn't work perfectly.

My problem with the arrays is that I can't seem to get the right variables to compute the correct values so to find the determinant.

ta
 
Computer science news on Phys.org
  • #2
shahil,

take upper bound of first part of arry and put second under that , this is nice example of nested "For Loop"

Rahul
 
  • #3
Two questions first:

Are you using a 2-dimensional array?
How is the data encoded.

I'd suggest hard coding the array at first just to see it working. It is a lot of copying and pasting.
 
  • #4
I remember you asked this question before. You also said you got 95% on the assignment, so you probably have some idea what to do. Remember this thread? You can check out the code there, and ask questions if you don't understand. Of course, it's not in VB, I'm guessing I wrote it in more of a C++-ish language, but if you can get the ideas right it shouldn't be hard to parse that to VB.
 

Related to Can VB be used to efficiently find determinants of 4 x 4 matrices?

What is a determinant?

A determinant is a mathematical value that represents certain properties of a matrix, such as its size, shape, and orientation. It is used in linear algebra to solve systems of equations and perform other operations on matrices.

Why use VB to find determinants?

VB, or Visual Basic, is a programming language that is commonly used for scientific and mathematical calculations. It has built-in functions and methods for working with matrices and calculating determinants, making it a useful tool for finding determinants quickly and accurately.

How do I use VB to find a determinant?

To find a determinant using VB, you can use the built-in "determinant" function, which takes a matrix as its input and returns the determinant as its output. You can also write your own custom code to calculate the determinant using mathematical formulas.

Can VB be used to find determinants for any size matrix?

Yes, VB can be used to find determinants for matrices of any size. However, as the size of the matrix increases, the computational time and resources required may also increase. It is important to consider the limitations of your computer or programming environment when working with large matrices.

Are there any limitations or drawbacks to using VB to find determinants?

One limitation of using VB to find determinants is that it may not be as efficient for large matrices compared to other programming languages or software specifically designed for mathematical computations. Additionally, VB may not be the best choice for more complex calculations involving multiple matrices or advanced mathematical concepts.

Similar threads

  • Computing and Technology
Replies
0
Views
322
  • Linear and Abstract Algebra
Replies
13
Views
1K
Replies
6
Views
1K
  • Programming and Computer Science
Replies
11
Views
2K
Replies
34
Views
2K
  • Calculus and Beyond Homework Help
Replies
6
Views
828
  • Quantum Physics
Replies
4
Views
636
  • Programming and Computer Science
7
Replies
235
Views
10K
  • Linear and Abstract Algebra
Replies
1
Views
1K
  • Programming and Computer Science
Replies
4
Views
456
Back
Top