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)
Jan Lubina (2021). Load rpc files (of type BINARY SHORT_INTEGER TIME_HISTORY) (https://www.mathworks.com/matlabcentral/fileexchange/9357-load-rpc-files-of-type-binary-short_integer-time_history), MATLAB Central File Exchange. Retrieved .
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.
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.
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?
Exactly what I was looking for. Thanks!
sorry for script failures,
improved script see load2_rpc.m
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!