03-14-2021 02:26 PM
@gleatd01 wrote:
Also, your saying I need to go more along this route?
No. According to the problem description, you have three arrays as input. All have the same length (not sure why they don't specify a 2D array where the columns are exam# and rows are students).
So do the following:
Note that the exercise is relatively flawed. You probably also want to retain the student ID, i.e. keep the original array index also in a cluster element so we can identify the student for each score in the final output. As I said, you also need to decide what should happen if the score is in an undefined interval, e.g ]79..80[. It is possible that average scores are rounded to integers, so you need to know the rounding rules and adjust accordingly.
03-14-2021 03:17 PM
@gleatd01 wrote:
... do you happen to know of a decent tutorial on threshold arrays?
Have you tried the help for the function? Have you tried searching the forum here? You might have come across this one, but there are many more examples.
Here's how it could be implemented in your problem. Try to figure out the rest of the code for some ideas, but do your own version. Note that most code subtleties have their reason so try to fully understand them. You need many adjustments, because it does not match all original problem requirements!
03-21-2021 10:45 AM
My examples seem to always be grey, might be missing something. But I did figure out the problem. I created an array for each then I weighted the grades and summed them and got the appropriate weighted grade. Figured out how to make cases with something other than true false by right clicking the border and was all set.
Thank you all. Just to figure out how to re enable examples.
03-21-2021 10:48 AM
Definitely need to look more into named bundles, I tried to add the rank at the end after sorting and had to unbundle the cluster to add the ranks. Also can you only sort by the first column?
03-21-2021 11:12 AM
@gleatd01 wrote:
Definitely need to look more into named bundles, I tried to add the rank at the end after sorting and had to unbundle the cluster to add the ranks. Also can you only sort by the first column?
You can sort any way you want, you just need to (at least temporarily) arrange the data the way you want it sorted. It is especially simple if you only want to sort by exactly one cluster element (example from here).