11-12-2019 07:16 AM
My teacher sent me this assignment.
I tried using the cluster, range comparison , arrays , and case structure.
But i couldn't put them together.
I would appreciate a little help.
11-12-2019 07:44 AM - edited 11-12-2019 07:48 AM
Bob Schor
P.S. -- if you get stuck, feel free to return, but you must attach the VI (or other LabVIEW code) you've created. This will show that (a) you are doing your own work, and are not asking us to do your homework for you, (b) will tell us a bit about your LabVIEW environment, (c) will show us "where you are confused" so we can give appropriate help. Please do not attach screen shots or "pictures" of code.
P.P.S. -- this is slightly advanced, so don't worry if it doesn't (yet) make sense. Whenever I create a Cluster, I always make a TypeDef out of it, which allows me to "indicate the cluster data using a single ID". I'm not sure if this is what you meant by the title of your Post, but once you get the idea of Clusters and how they are used, you might be interested in this "slightly advanced" topic. Also, I strongly recommend that you use the "by name" versions of the Cluster functions "Bundle" and "Unbundle", as it helps in wiring the Cluster elements correctly (you are less likely to create a record where the "Student Name" is "A" and the "Grade" is "John Smith").
11-12-2019 07:44 AM
Hi Arash,
this seems like a pretty common assignment for students - did you even try to search this forum for related threads?
Or did you talk with your co-students about this problem?
(I have seen several threads with very similar problems lately…)
Why don't you attach your current VI to show what you have reached so far?
Do you think you will get your homework (and grade) for free?
11-12-2019 07:53 AM
I'd be using the Threshold 1D Array to convert the average to an index...
11-12-2019 08:00 AM
The grade list is flawed. Which grade if they get exacly 59%?
/Y
11-12-2019 08:33 AM
@Yamaeda wrote:
The grade list is flawed. Which grade if they get exacly 59%?
/Y
I don't know about the specific case from the OP but, in my case I passed the course, graduated and got a job programming LabVIEW!
11-12-2019 10:16 AM - edited 11-12-2019 10:17 AM
@Yamaeda wrote:
The grade list is flawed. Which grade if they get exacly 59%?
/Y
Good catch. (S)he'd lose my respect as a programming teacher. Unless it's deliberate of course, to see who's paying attention.
My C++ teacher lost my respect when she claimed you need a 3rd variable to swap two variables.
11-12-2019 10:22 AM
It's pretty obvious.
If you pay a little attention you will see that 60_69 is a closed range
So below 59 actually means less than or equal to 59 or in other words a closed interval between 0_59.
So 59 is fail
11-12-2019 10:22 AM
In this case i'd say it's between D and F and have a special case with grade 'E'. 😄
/Y
11-12-2019 10:32 AM
"So below 59 actually means less than or equal to 59 or in other words a closed interval between 0_59"
No, below 59 means < 59, thus 0_58. 59 is undefined. 🙂
(yes, it probably is meant to mean 59 is failed, but if you're literal with the interpretation ...)
/Y