How difficult would creating this automated graphing program be?

2 次查看(过去 30 天)
Here is what I am trying to get going:
I have an excel sheet with a bunch of data collected in Labview. It is collected versus time and there are a series of events that occur at random times that I log. Overall I need to plot this data. What I want matlab to do:
Prompt the user with a gui menu that has:
1)Browse for file option: to select the data file from labview
2) Input timeline events (these can be as many as the user wants):
Name of Event:___________
Time occurred:____________ (in the same format as the excel sheet)
3) Create a graph that has the original data with the event names marked by either vertical lines on the graph or some sort of clear identifier that on this line plot of data these chunks are event 1 or 2 or 3 etc.
4) Also overlay on this graph a curve smoothing/ spline interpolation function
Is this possible and how difficult would it be to code? And is matlab the best solution for this or should i try and get it done in labview or something different? Right now I just use excel and it takes forever, when i would really like to automate things. These data files are very large, about 6hrs of data collected at 1 second.

采纳的回答

dpb
dpb 2014-4-29
If you're willing to use the gui components in an overall script and not worry about having a full graphics app, it's essentially trivial.
1. to select the file(s) wanted
doc uiopen
doc uigetfile
2. to get the input from user
doc inputdlg
3. plot, annotate...
doc plot
doc line
doc text
4. add fitted data, etc., ...
doc polyfun % for options in base Matlab; if have curve fitting are some other tools
  2 个评论
matlabuser12
matlabuser12 2014-4-29
My main concern is getting matlab to properly parse the data from labview. Is this also trivial? How well do the two play together?
dpb
dpb 2014-4-29
编辑:dpb 2014-4-30
No klew; how can you save the data in Labview? I used it just a little like almost 20 yr ago but they were standalone applications with no data interchange.
Well, let's see...here's a white paper from NI
Here's a File Exchange submission...no idea if the initial issues were fixed but looks like might have been...
But, your question says you've already got the data in Excel which is why I didn't mention the data source--that effectively has already removed Labview from the equation. In that case should be able to simply use
doc xlsread % and friends
Unless you are wanting this to be more closely coupled than through file exchange? There was another white paper/presentation from NI and a lot of other references in the search on using Matlab inside Labview and communicating t'other way 'round in the search that found the above as well.
Much, I suspect depends on just what your expectations are beyond what you've described.

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 LabVIEW 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by