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
Creating a program in Visual Basic to compute the determinant of a 4 x 4 matrix can be challenging, especially when not utilizing arrays effectively. The discussion highlights the importance of using a 2-dimensional array for better organization of data. It is suggested to hard code the array initially to simplify the debugging process. Utilizing nested "For Loops" can enhance the structure of the code. Additionally, referencing previous discussions and code examples can provide valuable insights and help clarify any uncertainties in the programming approach.
Shahil
Messages
115
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.
 
Thread 'ChatGPT Examples, Good and Bad'
I've been experimenting with ChatGPT. Some results are good, some very very bad. I think examples can help expose the properties of this AI. Maybe you can post some of your favorite examples and tell us what they reveal about the properties of this AI. (I had problems with copy/paste of text and formatting, so I'm posting my examples as screen shots. That is a promising start. :smile: But then I provided values V=1, R1=1, R2=2, R3=3 and asked for the value of I. At first, it said...

Similar threads

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