[SAC-HELP] saclab files

Januka Attanayake jattanayake at yahoo.com
Sun Feb 16 03:39:18 PST 2014


This is how you plot using rsac.m

Z = rsac('my.SAC');
plot(Z(:,1),Z(:,2))

Column 1 in Z is time, Column 2 in Z is amplitude/counts.

However, if you get an error about endean being the opposite, look in rsac.m as to where the endean is declared (big/small) and change it. 

Your header variables are stored in the 3rd column of Z matrix. You can find these here,
http://web.utah.edu/thorne/saclab/ch.m 

For example, if you want delta stored in Z (in the matrix output, line 1),  you would call for it with something like    
dt = Z(1,3).
e.g. line in rsac.m or ch.m
if input == double('DELTA   '); output(1,3) = varargin{i+1}; end
Januka.

--
Januka Attanayake
Postdoctoral Research Associate
Laboratório de Sismologia
Complexo Interdisciplinar
Departamento de Física
Instituto Superior Técnico
Av. Rovisco Pais, 1
1049-001 Lisboa, Portugal 

University email: januka.attanayake at ist.utl.pt
Homepage: http://sites.google.com/site/janukaattanayake/


________________________________
 From: Firdaus firdaus <alikomeini at gmail.com>
To: sac-help <sac-help at iris.washington.edu> 
Sent: Sunday, February 16, 2014 10:49 AM
Subject: [SAC-HELP] saclab files
 


dear all,

i've read and download all matlab's file in
http://web.utah.edu/thorne/software.html


currently, i'm using ubuntu 12.04, sac.106 and matlab 7.14

i've tried to execute rsac.m and p1.m in matlab, but i've error's message as below:

>> rsac
>> p1
Index exceeds matrix dimensions.

Error in p1 (line 44)
[a,b]=size(varargin{nargin});

Before executing these files, i've renamed my sac's file to be varargin.sac.
However, this error's message always come up in matlab's message.

please help me to solve this error.


regards,








_______________________________________________
sac-help mailing list
sac-help at iris.washington.edu
http://www.iris.washington.edu/mailman/listinfo/sac-help
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.iris.washington.edu/pipermail/sac-help/attachments/20140216/e7b4a15a/attachment.html>


More information about the sac-help mailing list