11-16-2023 12:41 AM
I am trying to create and graph a separate sine function on the same waveform graph that is just the first function with any Y value above a preset max amplitude. This is what I have so far. the arrays coming out of the first for loop look correct. All values where -max amplitude < Y < max amplitude are set to NaN, but something goes wrong when converting the 2 1D arrays into a waveform and I cant figure it out.
Solved! Go to Solution.
11-16-2023 01:49 AM - edited 11-16-2023 01:50 AM
Hi id,
@id6014 wrote:
I am trying to create and graph a separate sine function on the same waveform graph that is just the first function with any Y value above a preset max amplitude. This is what I have so far.
Why so complicated?
See this:
11-16-2023 03:25 AM
I did have to modify it slightly, but that worked perfectly. thank you so much.
11-16-2023 03:27 AM
Hi id,
@id6014 wrote:
I did have to modify it slightly, but that worked perfectly. thank you so much.
Instead of using InRange&Coerce and Negate you could also use an Abs() function on the Y data and a simple comparison as I suggested…
11-16-2023 12:26 PM
And why exactly do you think you need to rewrite all these properties with every iteration of the loop? Typically setting them once is sufficient and then whenever one of the inputs change (do they ever?)
(On a side note, You would get significantly better help if you would attach your VI instead of oversized pictures of disorganized code)
11-16-2023 12:35 PM - edited 11-16-2023 12:36 PM
Here's what I might do:
(I typically place the data with fewer points on top so it will show even if the linewidths are the same)