05-09-2013 02:25 PM
I need to plot some points in these graphs, but I don't know how to do this. In this example that I send, I need to plot all this points, but don't need to plot straight for the first point of the next value. I need to split the array of input.
Solved! Go to Solution.
05-09-2013 04:15 PM - edited 05-09-2013 05:02 PM
@Andrebiffe wrote:
but don't need to plot straight for the first point of the next value. I need to split the array of input.
Can you explain what that means?
What is "straight"?
What is the "first point of the next value"?
There are millions of different ways to split an array.
(none of your local variables or sequence structures are necessary, see e.g. here)
05-09-2013 05:02 PM
Ok, sorry I forgot to translate the names.
The array mean temperature, is the mean of all columns of temperature in the file txt. And the mean sensors, is the mean of all columns of sensors in wavelength. The first point of the next value is the initial value for the next sensor, by example, the value 100.003(last point) connects the point in the value 20.0062 (first point), and I don't wanna this. I need to connect the dots of the coordinates, but I need to be separated, because if you run the vi, you will see that the temperature values are repeated, are five values that are repeated 3 times. I need to generate 3 separate lines, ie if I separate these arrays and plot them I get what I need, but none of my ideas work.
05-09-2013 06:43 PM
You can create new plots whenever the x value drop or you could just add NaN values to create a gap (see attached rewrite)
(Note that I removed the useless local variables and sequence structure)
05-09-2013 09:08 PM
Wow man, your ideia is much better!!! =D Not wanting you to explore, you could explain in more detail what you did? On the question of using complex numbers, in cleaning the code I had already thought of that, but like everything I do has to be self-explanatory for the other people who work with those seen earlier had preferred that way, but what you did was great !! And there is still the possibility of these lines with different colors?
05-10-2013 01:21 AM
@Andrebiffe wrote:
And there is still the possibility of these lines with different colors?
You simply need to create seperate plots for each segment. If we can assume that all segments have the same length, the code can be dramatically simplified, e.g. as follows. If we cannot assume that, you could try to modify my previous code. Shouldn't be too difficult. 😉
05-10-2013 05:49 AM
Man you're a genius that is helping a beginner =D THANKS VERY MUCH!!!!