LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Table Lookup Fror Linear Algebra

I have a cluster of arrays with various previous input values A1 A2 A3 and output values Qx Qy and Qz. I have gotten my program to parse through the cluster for an array set that produces values close to my disired set and would like to use them to create and solve a system of equations so that I can solve for my peticular set.

 

The issue is that I must have a wire incorrect as, when I try to do the last step, the "soultion vector" value is way off from the selected values.

 

Additionially, if you can see a way to make the program better, I'm all ears 🙂

0 Kudos
Message 1 of 3
(2,895 Views)

I certainly can "see" the way to make this program better.  Listen carefully ...   [5 minutes later].  I hope you heard that (since you are "all ears"), but in case you didn't ...

 

How do you expect anyone, including yourself, to understand the code you have written?  There are a bunch of computations (which I'm sure that LabVIEW is doing correctly), but no description of what is being computed, what the "goal" is, so no way to tell if the numbers being produced "mean anything".  Arrays are being built (why?  What's in the arrays?), there's a case statement that does something that is involved with stopping the first For loop, a big mystery.  And that's just the first part of the code.  Then there are more loops, more arrays, more mysterious functions, computations on 2D arrays (representing what?), a Solution Vector and a Predicted Result.

 

I'm assuming that it produces the same result every time you run it (I must confess I haven't yet run it, since I have no idea what this does ...)  OK, now I've run it a few times, and it does, indeed, produce the same result when run with the same input.

 

So Congratulations, Your Code Does What You Told It to Do.  End of problem.

 

Perhaps you should "go back to the drawing board", start with a clear statement of the problem, describe (using words) one or more algorithms that you think will lead to a solution to the problem (including why you think the algorithm is suited to producing a solution), then implement the algorithm, providing enough documentation along the way for both you and a reader to have some clue what you are doing.  The code does what you tell it to do -- the problem is, you are telling it to do something (and I have no idea what that is!) that isn't leading to an answer to the Question that you are asking.

 

Bob Schor

0 Kudos
Message 2 of 3
(2,889 Views)
You're correct, apologies for the garbage post. Since I'm away from my license, I'll re-upload something tomorrow with better flow and comments tomorrow.
0 Kudos
Message 3 of 3
(2,876 Views)