f



how to transform this C code to MATLAB code

Hi,Firends

A C++ code like this:

char evfile[16];
fread(&evfile, sizeof(evfile), 1, fp); 

fp is a file name;
I want to transform it to MATLAB code, what should I do? 

Thanks for you help!
0
blusunrui (53)
4/10/2009 11:25:02 AM
comp.soft-sys.matlab 211266 articles. 22 followers. lunamoonmoon (257) is leader. Post Follow

1 Replies
729 Views

Similar Articles

[PageSpeed] 16

"lee rose" <blusunrui@gmail.com> wrote in message <grnaae$lnn$1@fred.mathworks.com>...
> Hi,Firends
> 
> A C++ code like this:
> 
> char evfile[16];
> fread(&evfile, sizeof(evfile), 1, fp); 
> 
> fp is a file name;
> I want to transform it to MATLAB code, what should I do? 
> 
> Thanks for you help!

Modern ML has equivalents to fopen, fread and file pointers.  File parsing used to be a real limitation (10+ years ago), leading to MEX solutions.  These days it's trivial.  Check the help for fopen, fclose and fread ... a bit like C.
0
4/10/2009 2:37:01 PM
Reply: