04-02-2014 07:29 PM
Hello everybody
I am working on a project for school and had a question as far as outputting out of a Matlab Script node. I have data that is stored in the form T(:,:,i) so it is a 3D data that is calculated within the the script.
The main thing I am wanting to do is output the data so I can graph it on a Labview front panel. I want to display a 2d image with a third dimension respresented as points on that 2d image. (2d as space with 3rd dimension being temperature).
It may not make sense why I am doing this in Labview but I have an entire GUI built for Labview and this is just one snippet of the things that I want to show. I included a file for the particular graphs I am trying to ultimately display.
I apologize I am still learning the ropes to Labview.
Solved! Go to Solution.
04-02-2014 07:38 PM
Hello BroChill,
I'd suggest you take a look at the LabVIEW Intensity Graph/Chart:
LabVIEW Help: Intensity Charts
It's designed for exactly the sort of application you're describing. There are several examples demonstrating their use that ship with LabVIEW (Help>>Examples), and more can be found in tutorials and community examples on NI.com- I'd recommend a search in your engine of choice if the shipping examples don't cover what you're looking for.
Best Regards,
04-02-2014 08:53 PM - edited 04-02-2014 08:57 PM
Thank you for the respone.
I know that there are graphs in labview that can accomplish this. My question is more about how to output the function T(:,:,i) into something managable in labview. It is my understanding that you can only output things of the type T(1,2). Unless I am mistaken.
04-03-2014 06:06 PM
Hi Jakeyboy1,
Below is a link that demonstrates how to send a 3-Dimensional array from LabVIEW, however you should easily be able to modify the block diagram in the article to switch the processes. In the article, the example code first auto-indexes a 3D array to assign T(:,:,i) within the script environment. Then LabVIEW uses another script node to process the built 3-Dimensional array.
You can switch this process. Out of the first script node wire out the length of the 3rd dimension and feed that into the N terminal of a for loop. Within the for loop place the script node which reads T(:,:,i) and outputs the 2D array from the node. You can wire this out of for loop and autoindexing should creat the 3D array in LabVIEW. Since the N terminal matches the length of the 3rd dimension. The resulting array in LabVIEW should be identical.
04-03-2014 10:17 PM