File Exchange

image thumbnail


version (7.53 KB) by Jan Lubina
Loads all channels of popular rpc-format files into a column matrix.


Updated 31 Mar 2016

View License

Filename is optional. Load all channels from BINARY rpc files (SHORT_INTEGER, TIME_HISTORY) into column matrix. Creates matching column time vector.
(not intended to read files larger than 50MB due to memory requirements)

Cite As

Jan Lubina (2021). Load rpc files (of type BINARY SHORT_INTEGER TIME_HISTORY) (, MATLAB Central File Exchange. Retrieved .

Comments and Ratings (11)

jonas seifert

great stuff!
I did not get into the nitty gritty (return type,... see comment 1*)
Just what i needed to quickly load visualize a measurement file supplied by an external laboratory.


Michael Breuer

Beside the overall poor programming quality throughout the script provided I have to rate this script as HARMFUL due to the wrong conversion from stored 16 bit integer values to floating point numbers (the error is small, but you expect to get the stored values, don't you?). The concept of groups and frames of the RPC file format is ignored to some degree.

Vojtech Brychta


The last line:

TIME = linspace(0, ndata / FFORMAT.fsample, ndata)';

should be replaced by:

TIME = linspace(0, (ndata-1) / FFORMAT.fsample, ndata)';


I have a 600 MB rsp file and get the following error:

Reference to non-existent field 'num_PPF'.

Error in load2_rpc (line 204)
fstep=round(FFORMAT.num_PPF / FFORMAT.num_PPF);

What does it mean?

Anne M

Exactly what I was looking for. Thanks!

medo basha

very good

ananth bhat


bond pong

Jan Lubina

sorry for script failures,
improved script see load2_rpc.m

MATLAB Release Compatibility
Created with R14SP1
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!