I have copied this block diagram directly from my textbook. In the textbook, there aren't any errors that should arise, but in my diagram there is a problem at the bundle going into the XY Graph. Any suggestions?
To help us to help you, please attach the "code that fails", rather than a "picture of code that might or might not work". This saves us time and effort (which we are "donating", for free).
You attached another picture, one that partly obscures the picture causing the Error. Assuming you are dealing with LabVIEW, you need to attach a file with the extension .vi, that is, LabVIEW code. We cannot "edit" a Picture, we cannot (or, at least, I cannot) clearly see a Picture (the pixels are blurry), and when I right-click it, I cannot execute a Picture (to see the Error, also blurry, for myself).
As it happens, I don't have MathScript installed on my version of LabVIEW (I use LabVIEW, not Matlab). But this is an opportunity to help you "learn LabVIEW", so bear with me.
First, look carefully at MathScript line 8. There is, I believe, a "typo" in the formula, which will certainly produce a nonsensical answer, if not an out-right Error.
So how to do this the "LabVIEW" way: use LabVIEW Structures and functions! Here we go:
I am uncertain why your MathScript routine gave you a 2D Array, but then I'm not a MathScript user. Try using LabVIEW, and see how easy (and logical) it is.
Thank you. I will try this out. The reason we are using the Mathscript Structure in Labview is because the textbook had us do it that way. I just asked our instructor and he said whatever way we can solve the issue, he is fine with.
remove one of the "t"s from the last line. one is enough!
"x=A*sin(pi*f*t)" instead of x=A*sin(t*pi*f*t)
Close, but only half a cigar (there's a clue buried in there ...).
It gets rid of the error and outputs a 1D array as desired. Data looks like a sine function. Problem solved....
If different math is needed, that's out of my control 😉 I am not providing ashtrays! 😄
(But yes, using plain G instead of mathscript would turn is into a "fewliner".)