DPlot Forum Index DPlot
http://www.dplot.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

DDE and arrays

 
Post new topic   Reply to topic    DPlot Forum Index -> Suggestions/Questions
View previous topic :: View next topic  
Author Message
Code-Breaker



Joined: 30 Apr 2004
Posts: 12
Location: Tempe, AZ

PostPosted: Wed May 19, 2004 12:39 pm    Post subject: DDE and arrays Reply with quote

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
Back to top
View user's profile Send private message Visit poster's website
Code-Breaker



Joined: 30 Apr 2004
Posts: 12
Location: Tempe, AZ

PostPosted: Wed May 19, 2004 1:05 pm    Post subject: Reply with quote

Cancel that request. I forgot about the sprintf command in Matlab. Smile
Back to top
View user's profile Send private message Visit poster's website
DPlotAdmin
Site Admin


Joined: 24 Jun 2003
Posts: 2310
Location: Vicksburg, Mississippi

PostPosted: Wed May 19, 2004 5:04 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Code-Breaker



Joined: 30 Apr 2004
Posts: 12
Location: Tempe, AZ

PostPosted: Thu May 27, 2004 4:14 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message Visit poster's website
DPlotAdmin
Site Admin


Joined: 24 Jun 2003
Posts: 2310
Location: Vicksburg, Mississippi

PostPosted: Thu May 27, 2004 4:24 pm    Post subject: Reply with quote

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.
_________________
Visualize Your Data
support@dplot.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Code-Breaker



Joined: 30 Apr 2004
Posts: 12
Location: Tempe, AZ

PostPosted: Thu May 27, 2004 6:24 pm    Post subject: Reply with quote

Here's what I get in Matlab:

Quote:
>> 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.)
>>

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
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    DPlot Forum Index -> Suggestions/Questions All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group