Thank you so much for sending the app! I have taken a look at it and now I know why you are getting the error. The reason is from the code on line 377:
NTA_SubScript(app, Histo_Plot, Int_Plot, data, 0)
Now, the input argument "data" is expected to be a struct created from "readtable" of the CSV file selected. I verified that "readtable" works on the CSV file given. However, the "data" variable that is getting populated is a local variable of the "Run1ButtonPushed" callback. Once you are inside the "RunButtonPushed" callback, the "data" variable is a new local variable created, with default value being empty, and hence if you place a breakpoint on this line, and examine the value of "data", you get:
Therefore, when you are trying to access
You get the error:
Struct contents reference from a non-struct array object.
As expected, because you are trying to get a struct content, "IncludedInDistribution_" from a supposedly struct "Data". However, "Data" is null.
In order to fix this issue, a workaround is to assign a property, such as "Data" in the perperties block of the app, and access the data as "app.Data". That way, the variable "app.Data" will be globally accessed by all callback functions.