From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
07-02-2021 03:47 AM
Dear All,
I made Intensity Graph from number of X-Y curves. And I want to get the data in X,Y,Z form.
I checked the data from intensity graph is 2D array. While, I plan to get in form of X,Y,Z.
the picture is as following (just for illustration).
I have no idea how to change into 3 columns X,Y,Z.
is it possible?
Could you advise me some possible solution for this matters?
I really appreciate for all advice.
Thank you
Solved! Go to Solution.
07-02-2021 09:23 AM
The values of the intensity graph are Z while X and Y are the array indices (Possibly scaled by offset and multiplier of the axes).
It seems trivial to iterate over the 2D array of intensities and form each row of the output based on the indices. What have you tried?
07-02-2021 09:34 AM - edited 07-02-2021 09:58 AM
If I understand the problem correctly, here is one possible solution.
(Since you only showed a picture, I'm only attaching a picture too. We typically prefer example VIs.)
It would be trivial to change the linear scaling of the x and y axes if needed, or swap their order in the output array. You could even conditionally skip all rows where Z=0, etc.
(The outer output tunnel mode is concatenating. Are you familiar with that?)
07-02-2021 09:58 PM
Dear Altenbach,
Thank you for your helpful advice.
you understood correctly the problem.
I am sorry for not uploading the VIs previously since the file is quite complex.
But you really gave good way.
What I had done before is by using for loop like you did, but it was only single for loop and used the auto-indexing instead of concatenating tunnel. so I made one outer for loop and one inner for loop and use the concatenating tunnel in the end.
I tried your advice by using simple X- and Y-array replacing the i element for both loop.
I haven't tried yet in the real data yet, but it seems it is going to work.
But please let me know if you have some advice/correction.
here attached the VIs.
07-03-2021 01:57 AM
No, You did not implement anything correctly.
Your version is obviously wrong and makes no sense.
Your "implementation" that you falsely label as "my version" is also incorrect. The X and Y arrays need to autoindex on different loops. Y on the outer loop (and the Y array need to match the number of rows), X on the inner loop (and the X array needs to match the number of columns).
And please don't maximize the front panel and diagram to the monitor. That's very annoying!
07-06-2021 02:52 AM
I see. I misunderstood.
Ok, noted. Y on the outer loop and X on the inner loop.
And please don't maximize the front panel and diagram to the monitor. That's very annoying!
>> I am sorry for that. I will be more careful next time.
Thank you for your help
I appreciate it.