Code covered by the BSD License  

Highlights from
SAC_Sun2PC_mat

4.5

4.5 | 7 ratings Rate this file 10 Downloads (last 30 days) File Size: 4.86 KB File ID: #3859

SAC_Sun2PC_mat

by Christos Saragiotis

 

14 Aug 2003 (Updated 18 Aug 2003)

This is utility to read SAC (Seismic Analysis Code) binary files created on/for SUN platform.

| Watch this File

File Information
Description

Syntax: sac_sun2pc_mat('filename')

Reads the SAC binary files from/for SUN platform and creates a .mat file that consists of
1. a structure, H, that contains all the header information and
2. a vector, X, that contains the waveform.

The input file 'filename' must be either a sac file with extension .sac or a path. In the latter case all sac files in this path are converted.

The path must be the full path, i.e., 'C:\Data\920611_001538_00_405'.

The mat files are saved in the folder, in which the original .sac file exists.

The SAC format files and names of variables are based on documentation, I have found in the internet. Some SAC Header variables that are 'not currently used' (according to the documentations, I found) are in comments, whereas others are ommitted.

This file has been tested (not thoroughly, though) using Matlab 6.5 but should be working on all other previous Matlab 6 or 5 versions as well.

Note that the file is NOT guaranteed to work perfectly, so please check your results.

Please send any comments or corrections to csar@auth.gr
 
SAC_SUN2PC_MAT written by C. D. Saragiotis on August 14th, 2003

Acknowledgements
This submission has inspired the following:
sacsun2mat
MATLAB release MATLAB 6.5 (R13)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (7)
17 Jun 2004 Langqiu Sun

it's convenient! but better if append .sac file name after H/X so that when there are more than one .mat loaded, values in H/X would not be changed.

26 Jan 2005 Nikolaos Politis

This is a great application!

05 May 2005 CHAKIB BEKKALI  
17 Jul 2006 Dayi Chen

Good !

06 Apr 2007 zhang y

Thanks!

06 Apr 2007 zhang y

Thanks!

28 Oct 2007 wu shiping

I want to know how to read *.*

Please login to add a comment or rating.
Tag Activity for this File
Tag Applied By Date/Time
sac Christos Saragiotis 22 Oct 2008 07:06:32
seismic analysis code Christos Saragiotis 22 Oct 2008 07:06:32
binary Christos Saragiotis 22 Oct 2008 07:06:32
sun platform Christos Saragiotis 22 Oct 2008 07:06:32
earth sciences Christos Saragiotis 22 Oct 2008 07:06:32

Contact us at files@mathworks.com