LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Pretty basic help with a program

OK.  I think that I am beginning to see what you're trying to do.  I think that you need to move much or your code inside the for loop.  Right now all of your case statements are only working on the last values to come out of the for loop.  Moving these inside the for loop should solve this problem. However, it won't solve the problem with the unsquare matrices.
 
In addition to using custom probes you can watch the program execute in highlight mode to see the size of the arrays.  Breakpoints can be inserted so that you can turn on execution highlighting only during the part of the program in question.
0 Kudos
Message 11 of 15
(813 Views)
That was indeed the problem and I am trying to fix that now--thanks you!
 
Hopefully now that I have recognized the problem I can fix it.
 
Thanks again,
 
NM
0 Kudos
Message 12 of 15
(807 Views)
Hey guys, I am back 🙂
 
Does anyone here have any familiarity with the Solve Linear Equations function?
 
I do not seem to be able to get it to work, despite it being a rather simple program, at least seemingly so... I have written two very simple programs that should easily be solved. It is just a three by three matrix, and I have no idea why it is returning an empty array as the solution.
 
The three by three (with augment as the solution), if I am correct (and I took this from a textbook..)
 
1
2
3
9
2
-1
1
8
3
0
-1
3
This is just solved by appending the end and running it as the solution vector through the program... the solution SHOULD be
 
x1 = 2, x2 = -1, x3 = 3
 
Which is pretty easy to eyeball/do-by-hand... anyone see what I am doing wrong?
 
Thanks,

NM
 
 

Message Edited by Nicholas on 07-26-2005 12:46 PM

Message Edited by Nicholas on 07-26-2005 12:47 PM

Message Edited by Nicholas on 07-26-2005 12:48 PM

Download All
0 Kudos
Message 13 of 15
(798 Views)
Your problem is not with the Solve Linear Equations function at all.  Once again you are not giving the right information to the function.  You should be giving the function a 1D array and a 2D array, but you're giving it two 2D arrays.  This can be easily seen by noticing the double line.  Also, when you have problems I suggest that you always probe your program/use execution highlighting to make certain that you are getting what you expect at each step of the program.
 
I have attached a modification to your program which does what you want.

Message Edited by John Rich on 07-26-2005 02:45 PM

0 Kudos
Message 14 of 15
(769 Views)

John Rich, if you are ever in D.C. I owe you a beer. You definitely mentioned this stuff before but it was seeing the program that really made it all click.

 

At any rate the program is up and running and I can get to the taking data/doing physics (fun stuff)


Thank you all!

 

NM

0 Kudos
Message 15 of 15
(761 Views)