LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Beginner help with arrays.

Solved!
Go to solution

Hi,

 

So thanks to all of your help, I have come to a point where I'm very happy with the code except for one part. I can't figure out how to make the output of the for loop with case structure an array with all 16 letter grades. Is there a way to bundle the final averages into an array which will give me all letter grades at once? I am only able to vie the first grade at this point.

 

I have attached the most recent version of my code.

 

Thanks again!

George

Download All
0 Kudos
Message 11 of 13
(1,158 Views)

RavensFan,

 

Thanks again for your help. That one constant did exactly what I needed as you suggested.

 

George

0 Kudos
Message 12 of 13
(1,157 Views)
Solution
Accepted by topic author gsrokmix

The output of the For Loop IS an Array.  Your front panel is only showing the first element, drag the bottom border of that indicator to show them all.

 

Get rid of the constants 1, 2, 3, 4 on Index Array.  Just leave the 0 constant to define that outputs being columns.

 

Do block diagram cleanup That will get rid the backwards running wires.

 

Implement the code I showed before.  It will:

1.  Get rid of the hack where you need to subtract, 1, 2, 3, 4, becaue the student ID is getting averaged into the grades.

2.  Make your code scalable. Right now you are hardcode to average exactly 4 grades.

3.  Fix the problem where an average of 89.5 gets rounded up to an integer 90 and drives the case structure to an "A"

 

Also, that light blue is hard on the eyes.  Go back to a default grey front panel background.

0 Kudos
Message 13 of 13
(1,151 Views)