Code covered by the BSD License  

Highlights from
uwrite/uread

5.0

5.0 | 3 ratings Rate this file 3 Downloads (last 30 days) File Size: 8.58 KB File ID: #2055

uwrite/uread

by Sridhar Anandakrishnan

 

29 Jul 2002 (Updated 22 Jul 2009)

UREAD/UWRITE are like FREAD/FWRITE except that they operate on arrays in memory.

| Watch this File

File Information
Description

A=UWRITE(D, PREC) will create a uint8 array A from the double array D. The format of the binary data in A is determined by PREC (one of uint8, uint16, uint32, int8 int16, int32, float32, float64, or double). The size of A is dependent on the precision PREC.

D=UREAD(A, N, PREC) will read the uint8 array A and return N values into D. The data in A are assumed to be in the format of PREC (see UWRITE for supported formats).

Required Products MATLAB Compiler
MATLAB release MATLAB 6.5 (R13)
Other requirements Tested on sun solaris2.8 (gcc) and Windows 2000, MATLAB-supplied compiler
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (4)
10 Mar 2005 Medon Decker

Works as advertised :-) (WinXP, R13)

THANK YOU

06 Sep 2006 Michael Sprung

Thank you!!! It is really a shame that these are not implented routines of Matlab. It help me greatly speeding up my binary data input.

21 Jun 2010 Shlomi

This was really what I need to solve my problem with fwrite that works to slow hen multiple precision is needed (similar to the problem presented here: http://www.mathworks.de/matlabcentral/newsreader/view_thread/94508)
Nobugs found (yet).

12 Aug 2010 Werner Goeman

Solved my problem immediately. The writing is now more than 10 times faster. Thank you!
Remark: 'single' is not supported, use 'float32' instead

Please login to add a comment or rating.
Updates
20 Jun 2003

fixed documentation.

20 Jun 2003

fixed documentation

20 Jun 2003

fix documentation

22 Jul 2009

Removed GPL license.

22 Jul 2009

Removed GPL license from uwrite.c/uread.c

Tag Activity for this File
Tag Applied By Date/Time
data import Sridhar Anandakrishnan 22 Oct 2008 06:46:54
data export Sridhar Anandakrishnan 22 Oct 2008 06:46:54
uread Sridhar Anandakrishnan 22 Oct 2008 06:46:54
uwrite Sridhar Anandakrishnan 22 Oct 2008 06:46:54
fread Sridhar Anandakrishnan 22 Oct 2008 06:46:54
fwrite Sridhar Anandakrishnan 22 Oct 2008 06:46:54
uint8 Sridhar Anandakrishnan 22 Oct 2008 06:46:54
binary Sridhar Anandakrishnan 22 Oct 2008 06:46:54

Contact us at files@mathworks.com