Code covered by the BSD License  

Highlights from
C++ raw data dumper

5.0

5.0 | 3 ratings Rate this file 3 Downloads (last 30 days) File Size: 19.51 KB File ID: #12924
image thumbnail

C++ raw data dumper

by sun peng

 

07 Nov 2006 (Updated 01 Aug 2008)

Dump C++ data into Matlab to make debugging C++ program more easily. Handier than using engine APIs

| Watch this File

File Information
Description

NOTE!!!!!!!!!!!!!!!!!!!!!!!!!!
******************************
This project is NO LONGER maintained because it HAS BEEN INCORPORATED into:

C/C++ and Matlab types convertor
File Id: 20927
http://www.mathworks.com/matlabcentral/fileexchange/loadFile.do?objectId=20927&objectType=FILE

Dump C++ data (native or user-defined) into Matlab workspace to make debugging C++ image processing/signal processing/scientific calculation program more easily. Wrapper of Matlab engine APIs. But it??s more convenient than using engine APIs directly.

For example:
    // C++ code stub
    const unsigned int len = 20;
    double sig[len];
    generate_sig (sig, len); // do something...

    // view the processed data in matlab...
    matlab << name ("sig") << width (len) << height (1)
      << start(sig)
      << cmd ("figure;stem(sig);set(gcf,'name','example 1: 1-D signal');");

It dumps C++ double array into matlab and converts it as a 20x1 matrix, then plot it.

For another example:

// C++ code stub
const unsigned int LEN = 42*256*3;
    unsigned char buf[3*LEN];
    generate_color_img (buf, LEN); // do something
    const char* command =
      "figure;"
      "imagesc(imgc);"
      "set(gca,'visible','off');"
      "set(gcf,'name','example 3: color image');";

    matlab << name ("imgc")
      << width (256) << height (42*3) << channel (3)
      << start (buf)
      << cmd (command);

This will view C++ array buf as a color image in Matlab workspace.

SEE README.HTM AND EXAMPLES IN THE ZIP FILE FOR MORE DETAILS!
HAVE FUN:)

MATLAB release MATLAB 7.2 (R2006a)
Other requirements An up-to-date C++ complier supported by Matlab engine APIs
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (3)
17 Nov 2006 shu yu

Thank you, very good¡­¡­I find this for a long time.

03 Jun 2008 Prashant Patil

It can solve my great problem , but got an error during compiling " could not found libmx.dll , reinstalling may solve the problem " .I reinstalled matlab but the problem did'nt solved .Can anybody help me.

04 Oct 2008 Prashant Patil

After running this program I got the error libmx.dll not found .Actually After installing the MATLAB it need a computer restart before using this codes.It totally worked after restarting computer......Great work helped me in real time plotting , image processing , debugging etc

Please login to add a comment or rating.
Updates
01 Aug 2008

Modification on Description...

Tag Activity for this File
Tag Applied By Date/Time
data import sun peng 22 Oct 2008 08:48:20
debug sun peng 22 Oct 2008 08:48:21
c sun peng 22 Oct 2008 08:48:21
data export sun peng 22 Oct 2008 08:48:21
dump sun peng 22 Oct 2008 08:48:21
matlab sun peng 22 Oct 2008 08:48:21
engine sun peng 22 Oct 2008 08:48:21

Contact us at files@mathworks.com