Get from Ico-github-logo

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Highlights from
RDMSEED and MKMSEED: Read and write miniSEED files

5.0 | 12 ratings Rate this file 67 Downloads (last 30 days) File Size: 363 KB File ID: #28803 Version: 1.2
image thumbnail

RDMSEED and MKMSEED: Read and write miniSEED files



23 Sep 2010 (Updated )

Imports and exports data files in seismological format "mini-SEED"

| Watch this File

File Information

Matlab codes to read and write miniSEED files


This file inspired Read Mseed Fast(File Name).

Required Products MATLAB
MATLAB release MATLAB 8.3 (R2014a)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (24)

25 Oct 2016 Riitta Hurskainen

Thanks a lot, this is important program

Comment only
12 Oct 2016 hc zhang

Great work! I'm wondering the unit of output data (say X.d)? Counts or ??

06 Jun 2016 Christopher Zaworski

Hi there, the rdmseed program I have works great! Does anyone know how to get it to read a SEED Volume file?

Comment only
16 May 2016 Jesus Farfan

Thank you, this is a very useful tool.

04 May 2016 Kevin Develle

Hi Francois,

Sorry I forget to say thank you to your answer, I have follow you suggestion and it work perfect, it is a very powerful tool!


Comment only
29 Mar 2016 Tonino Fernandez

Wonderful tool to red mseed or seed files.
The output's options ar so great and efficients.
Thank you Dr. Beaudecel.

10 Feb 2016 François Beauducel

Hi Kevin,

Yes, the Steim encoding is only for integer values (counts), usually it is used to store raw data like digitizer outputs.

In your case you have 2 solutions:

A. use another encoding adapted to floating point numbers (like IEEE float32 or float64), without compression. But some miniseed readers might not read it...

B. or as you suggest, multiply your data by a coefficient, for instance 1e6, so you will have a 1 µV resolution.



Comment only
09 Feb 2016 Kevin Develle


I would like to use this program to generate mseed files with Steim1/2 encoding, but my sensor provides me +/-500mv value so when the mkmseed function cast D to int32, I have only -1,0 or 1. Is there a coefficient to apply when you want to work with steim 1/2?


Comment only
08 Jun 2015 Ashraf

Ashraf (view profile)

Hi Guys, I am looking for a function to read seed files contains a large number of earthquake stations, any one can help me???

Comment only
27 Nov 2014 sayyed mahmood

Thank you François Beauducel.

Comment only
26 Nov 2014 François Beauducel

Dear Mahmood,
The best way to convert miniseed to SAC is outside Matlab using the IRIS tool mseed2sac:
which works for Windows/Linux/Mac.
Install this code and from Matlab, call it using the system() function.

Comment only
26 Nov 2014 sayyed mahmood

i want to convert mseed to sac in matlab. can every body help me plz

29 Aug 2014 Dicky

Dicky (view profile)

I am sorry, it is my bad. I just realize that it is not same value. it is date vector / datenum. Thank you very much.

29 Aug 2014 François Beauducel

Thanks Dicky,
The time vector is in datenum Matlab format (see datenum for description). You must apply the command:


after plotting the data to have time labels (see datetick function).

Comment only
29 Aug 2014 Dicky

Dicky (view profile)

Hi. Very good work. I've tried with my file and it was plotted very good. But I encounter problem here. The x-axis in the figure show the right label, but in the time vector variable show N-sample by 1 matrix with the same value which is 7.4e5. I try another encoding format but still the same. Do you have any suggestion? Thank you very much.

Comment only
31 May 2014 François Beauducel

The problem detected by Robert is solved. Number of plotted channels in multiplexed files is now limited to 20 subplots, with a warning message. For larger number of channels, please use the functional form [X,I]=rdmseed(...) to load and plot what you want (see help).

Comment only
30 May 2014 Robert Chase

Hello, when running the a miniSEED file from the NCEDC, I recieve the error "Error using cat. Dimensions of matrices being concatenated are not consistent" (Line 284) Does anyone have any advice or help to offer? Thanks!

Comment only
24 Dec 2012 Natalya

30 Nov 2011 Petr Kolar

works intuitively for the first run. thanks.

27 Oct 2011 Jonathan Berger

19 Jul 2011 Del Bohnenstiehl

22 Nov 2010 Dupont Aurelien

Extremely useful and very fast. An essential tool!

05 Oct 2010 Forrest Brett

04 Oct 2010 1.5

- add input formats for GEOSCOPE multiplexed old data files
- additional output argument with gap and overlap analysis
- create a plot when no output argument are specified
- optimize script coding (30 times faster STEIM decoding!)

22 Jul 2011 1.6

- Validation of ASCII encoding format (logs)
- Blockettes are now stored in substructures below a single field X.BLOCKETTES
- Add import of blockettes 500 and 2000
- Accept multi-channel files with various data coding

20 Oct 2011 1.7

Complementary function mkmseed.m allowing to write mini-SEED file.

25 Oct 2011 1.8

mkmseed: add Steim-1 and Steim-2 encoding formats.

23 Apr 2012 1.9

Correction of a bug with little-endian file coding and Steim-1/2 data encoding.

26 Dec 2012 1.10

adds a verbose mode (option)

25 Oct 2013 1.11

- fix warning problem in R2013b (bitcmp)
- better header test to guess big/little-endian coding
- adds option 'be' to force big-endian read

17 Mar 2014 1.12

- Improved endianness automatic detection (see comments).
- Accepts mixed little/big endian encoding in a single file.
- minor fixes.

07 May 2014 1.13

 - applies the time correction to X.t (if needed)
 - Geoscope 16/4 format passed real data archive tests

 - accepts time vector T and detects data blocks (gaps and overlaps)
 - adds GEOSCOPE 16/3-4 bit gain ranged coding

09 May 2014 1.14

fix a bug in time correction reading

02 Jun 2014 1.15

- applies the time correction to StartTime (if needed)
- new option to disable time correction
- fixes a problem when plotting multiplexed channels (thanks to Robert Chase)

01 Jul 2014 1.16

fixes 24-bit uncompressed format reading.

11 Aug 2016 1.2

- fixes an issue with time sampling in the T0,FS mode.

Contact us