Matlab codes to read and write SAC seismic data file
François Beauducel (2020). RDSAC and MKSAC: read and write SAC seismic data file (https://github.com/IPGP/sac-matlab), GitHub. Retrieved .
Thanks Alara. To get values as arrays you just have to add an output parameter in the command window:
and you will get time vector in X.t and data vector in X.d
Thanks for the code, it works perfect. But i need the t and acc values to get the response spectrum of records that code has extracted. Could you possibly explain how can i get t and d valueas as an array?
Thanks Randall. In fact this behaviour was not implemented! Sorry for that and please download the updated version.
I am using MKSAC and passing in a data vector as well as a time vector. The comments in the header state that delta should be set automatically based on median of time differences between samples. However, it does not do this. It leaves it as the default value of 1.
I can't get the function to plot my SAC file. I made a new script and wrote x =rdsac(). This opens a browser window and when I click on the SAC file I want to plot and hit 'Select', I get errors on line 223 and line 92. Has someone encountered similar problem?
There is a coding error in Line 92, it should read: [H,t0] = readheader(fid,varargin);
It is helpful for me.
Thanks Rall for your feedback. This is a good idea to optimize the memory after importing data. Probably the best thing is to let the user adding himself the double() function, if he wants to make extensive signal processing (which is not compatible with all classes).
Thanks for this, definitely a great utility! I really appreciate it.
As it stands, it is extremely memory intensive. Loading in a .sac file that is less than 3 KB balloons up to over 10x original size.
I added an option (inelegantly) to not store the time as a double vector, and prevent the float32's from converting to doubles. I am sure others with moderately large datasets would also appreciate this option.
Exactly what one expect - thanks.
it is need to me.
Does anybody knows how to make changes in boundary conditions in mFD2D using crewes package. also what is the output for each hidden file in mFD2D. how can i learn?
Is it possible to convert SAC file to acceleration time history file? As a civil engineer, I have no idea what count is.
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!