Hi,
I am creating plots using Matlab and DDE. Works like a charm.
I am using the XYXY command to pass data to be plotted. Matlab's extensive use of arrays and matrices makes me wonder. How hard would it be to have a command that would allow me to pass arrays of data, instead of X,Y pairs? Perhaps there is already a way of doing this, and I am overlooking it?
-C-B
DDE and arrays
-
- Posts: 12
- Joined: Fri Apr 30, 2004 2:03 pm
- Location: Tempe, AZ
- Contact:
-
- Posts: 12
- Joined: Fri Apr 30, 2004 2:03 pm
- Location: Tempe, AZ
- Contact:
- DPlotAdmin
- Posts: 2312
- Joined: Tue Jun 24, 2003 9:34 pm
- Location: Vicksburg, Mississippi
- Contact:
It's been quite a while since I've sat in front of Matlab and I have no idea whether you can call functions in DLLs. If you can, then you'll be better off calling DPlot_Plot and/or DPlot_AddData. Really it all depends on how much data you're passing: if 1000 or so points or fewer then you won't notice much difference on the time, but for large data sets and/or if you're impatient, you'll save time passing arrays rather than converting to strings using sprintf - which DPlot must then convert back to numbers.
Visualize Your Data
support@dplot.com
support@dplot.com
-
- Posts: 12
- Joined: Fri Apr 30, 2004 2:03 pm
- Location: Tempe, AZ
- Contact:
Hi David,
I have been doing some research on Matlab and external dlls. it can do it, but it needs a header file containing function prototypes to be able to load the library. I tried using 'dplot.h', which I found in the dplotjr\dplotlib\c directory, but it didn't work.
Any suggestions? Thanks. -Chris
I have been doing some research on Matlab and external dlls. it can do it, but it needs a header file containing function prototypes to be able to load the library. I tried using 'dplot.h', which I found in the dplotjr\dplotlib\c directory, but it didn't work.
Any suggestions? Thanks. -Chris
- DPlotAdmin
- Posts: 2312
- Joined: Tue Jun 24, 2003 9:34 pm
- Location: Vicksburg, Mississippi
- Contact:
This page: http://www.codeproject.com/dll/MatlabGenericDll.asp implies that normal C header files will work. You may need to delete everything in dplot.h other than the function prototypes, I dunno.
The referenced article also explains how to call function in DLL's; if you weren't aware of this you might give it a try.
If this is no help at all let me know; maybe I can talk Santa Claus into an early Christmas and get Matlab.
The referenced article also explains how to call function in DLL's; if you weren't aware of this you might give it a try.
If this is no help at all let me know; maybe I can talk Santa Claus into an early Christmas and get Matlab.
Visualize Your Data
support@dplot.com
support@dplot.com
-
- Posts: 12
- Joined: Fri Apr 30, 2004 2:03 pm
- Location: Tempe, AZ
- Contact:
Here's what I get in Matlab:
An interesting thing to me is that several of the warnings are duplicates for the same functions, and some of the functions generated no warnings (eg., DPlot_Plot). I will continue to work at this. Thanks for your help. -Chris>> loadlibrary('c:\work\dplotlib.dll','c:\work\dplot.h')
Warning: The data type 'error' used by function DPlot_Command does not exist
(Type "warning off MATLAB:loadlibrary:typenotfound" to suppress this warning.)
Warning: The data type 'error' used by function DPlot_GetBitmap does not exist
(Type "warning off MATLAB:loadlibrary:typenotfound" to suppress this warning.)
Warning: The data type 'error' used by function DPlot_GetBitmapEx does not exist
(Type "warning off MATLAB:loadlibrary:typenotfound" to suppress this warning.)
Warning: The data type 'error' used by function DPlot_GetEnhMetaFile does not exist
(Type "warning off MATLAB:loadlibrary:typenotfound" to suppress this warning.)
Warning: The data type 'error' used by function DPlot_Plot does not exist
(Type "warning off MATLAB:loadlibrary:typenotfound" to suppress this warning.)
Warning: The data type 'error' used by function DPlot_PlotBitmap does not exist
(Type "warning off MATLAB:loadlibrary:typenotfound" to suppress this warning.)
Warning: The data type 'error' used by function DPlot_PlotBitmap does not exist
(Type "warning off MATLAB:loadlibrary:typenotfound" to suppress this warning.)
Warning: The data type 'error' used by function DPlot_PlotToRect does not exist
(Type "warning off MATLAB:loadlibrary:typenotfound" to suppress this warning.)
Warning: The data type 'error' used by function DPlot_PlotToRect does not exist
(Type "warning off MATLAB:loadlibrary:typenotfound" to suppress this warning.)
Warning: The data type 'error' used by function DPlot_Request does not exist
(Type "warning off MATLAB:loadlibrary:typenotfound" to suppress this warning.)
Warning: The data type 'error' used by function DPlot_Request does not exist
(Type "warning off MATLAB:loadlibrary:typenotfound" to suppress this warning.)
Warning: The data type 'error' used by function DPlot_Start does not exist
(Type "warning off MATLAB:loadlibrary:typenotfound" to suppress this warning.)
>>