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

  • Thread starter Thread starter Shahil
  • Start date Start date
  • Tags Tags
    Determinants
Click For Summary

Discussion Overview

The discussion revolves around the use of Visual Basic (VB) for efficiently calculating the determinant of a 4 x 4 matrix. Participants explore coding strategies, particularly focusing on the use of arrays and loops, and share experiences related to programming challenges.

Discussion Character

  • Technical explanation, Homework-related, Exploratory

Main Points Raised

  • One participant expresses difficulty in using arrays for computing determinants and mentions that their current approach is lengthy and not fully functional.
  • Another participant suggests using a nested "For Loop" to manage the array structure more effectively.
  • A third participant inquires about the use of a 2-dimensional array and the data encoding method, recommending hard coding the array initially to simplify testing.
  • A later reply references a previous discussion where the original poster had achieved a high score on a related assignment, suggesting that they may already have some foundational knowledge to build upon.
  • This reply also notes that while the previous code was not in VB, the underlying concepts could still be applicable.

Areas of Agreement / Disagreement

Participants do not reach a consensus on the best approach to use arrays in VB for this task, and multiple strategies are proposed without clear agreement on which is superior.

Contextual Notes

There are indications of missing assumptions regarding the structure of the matrix and the specific requirements for the determinant calculation. The discussion also reflects uncertainty about the effectiveness of different coding strategies.

Who May Find This Useful

Individuals interested in programming with Visual Basic, particularly those working on matrix operations or seeking to improve their coding techniques in mathematical contexts.

Shahil
Messages
116
Reaction score
21
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
shahil,

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

Rahul
 
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.
 
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.
 

Similar threads

  • · Replies 6 ·
Replies
6
Views
4K
  • · Replies 13 ·
Replies
13
Views
2K
  • · Replies 11 ·
Replies
11
Views
2K
  • · Replies 6 ·
Replies
6
Views
3K
  • · Replies 5 ·
Replies
5
Views
4K
Replies
235
Views
15K
  • · Replies 34 ·
2
Replies
34
Views
4K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K