File Exchange

image thumbnail

SeisLab 3.01

version (2.9 MB) by Eike Rietsch
Release 10.0301 of a collection of functions for analysis/display of seismic and well-log data.


Updated 01 Mar 2010

View Version History

View License

A set of about 170 functions (plus support functions called by them) for analysis and display of exploration-seismic data and well logs. These functions read and write seismic data in standard SEG-Y format, read and write well logs in LAS-format 2.0 (also read LAS-format 3.0), and perform many of the manipulations usually performed on these data types. They use standardized structures to represent seismic data and well data and thus allow simple concatenation of function calls.

The functions come with a manual in PDF format and scripts with examples. Several versions of Matlab were released during their development. Presently, I run them under R2007b, but I try not to use Matlab syntax introduced after R2007a. Also, SeisLab 2.01, which works with Matlab 6.1 (2001) and higher, can still be downloaded from the Matlab File Exchange (file 8827).

Generally, I make an effort to avoid functions from toolboxes; however, I am aware of at least one call to a function in the Optimization Toolbox.

In case you already have SeisLab installed you can find its distribution ID by typing "ddid" at the Matlab prompt. If you get the error message "Undefined function or variable 'ddid'." then you have the very first release of SeisLab. Otherwise, compare the distribution ID with that of this release. If it is lower then this release is newer.

Major changes in SeisLab 3.0:

Some functions require Matlab R2007a or higher.

Representation of seismic data and log data in single-precision or double-precision with trivial conversion from one into the other via overloaded functions "single" and "double". This means datasets can be about twice as big.

LAS-file reader rewritten; reads LAS 2.0 and 3.0 files;
the old LAS-file reader (LAS 2.0 only) is still available as "read_las2_file". It is somewhat faster.

SEG-Y file reader rewritten. For large files it is much faster than the previous one; even more so if IBM to IEEE conversion is required. The original SEG-Y reader is still available as "read_segy_file_legacy".

Display of volumes of seismic data in form of slices, contour slices, iso-surfaces ("s_volume_browser"). Slices can be static or animated. The volume-browser software is no longer included in this distribution as it is on a different update schedule. If you don't have it you can download the latest version from the Matlab File Exchange (file 13526).

Faster and more accurate seismic plots.

EXAMPLE (used to plot the attached figure):

% Read interactively selected SEG-Y file
seismic = read_segy_file;

% Make a volume plot of the data read

Cite As

Eike Rietsch (2021). SeisLab 3.01 (, MATLAB Central File Exchange. Retrieved .

Comments and Ratings (45)

Glenn Thompson

This could be a useful toolbox to incorporate into GISMO.

long an

Hi, @ David Curia, this error also occured in my computer. You can do this:
then it work, good luck!

David Curia

Error using num2str (line 47)
Input to num2str must be numeric.
I am starting with SeisLab. I am following the documentation, but there is an error with s_cplot (even in the simplest way to call it). The error is the following:

"Error in myimagemenu (line 24)

Error in s_cplot (line 265)
myimagemenu % Create menu button to interactively change colors, etc."

David Podrasky

Doesn't work out of the box.

Pulak Biswas

I have separate segy files for each shots along a line. I want to produce a CDP gather how can I do that.



Hi everyone, I just ask how can i use seislab to manipulate saismic and well data.

Alfredo guerrero

Hi everyone I wonder if somebody have this function ('s_wedge_model') which is not included in SeisLab 3.01, I relly will appreciate if you share it.

Moustafa Elzeftawy

Hi Eike,

I have tried to make the tool read two files, the first, las1, got the following:

>> wlog=read_las_file('las1.txt') File "las1.txt" not found. Select file interactively. File C:\Users\19067654\Documents\PhD\Practical\Coal_DT\las1.las interactively selected

wlog =

struct with fields:
type: 'well_log'
tag: 'unspecified'
name: 'las1'
first: 152.5000
last: 1.3895e+03
step: 0.5000
units: 'm'
null: []
from: 'las1.las'
curve_info: {'depth' 'm' ''}
curves: [2475×1 double]
wellname: 'AAO_ANABRANCH_1'
the second file gave me these errors:

>> wlog=read_las_file('las3.las') Subscripted assignment dimension mismatch.

Error in interpret_las2>data_section_no4 (line 269) curves(ii,:)=sscanf(tlines{ii},'%g')';

Error in interpret_las2 (line 55) wlog=data_section_no4(wlog,tlines(index(ii)+1:index(ii+1)-1),wrap);

Error in read_las_file (line 107) wlog=interpret_las2(tlines(3:end)); "

Can you help please.

Regards Moustafa

Prakash Ranjan

After downloading the Seislab 3.01, I copied the "S4M" folder under C:\Program Files (x86)\MATLAB.

On giving command "presets" under Command Window" I am getting error "Undefined function or variable".

What am I missing ?


hi friends;
i am trying to work with the Seislb3.02 on the 2016a version but when runnig the presets i have this problem

Attempt to execute SCRIPT version as a function:
C:\Program Files\MATLAB\R2016a\toolbox\local\ja\version.m

Error in systemDefaults4Seislab (line 76)

Error in presets (line 9)


Thank you so much for this wonderful package! I'm analyzing a 3D refraction dataset and this has made plotting data and looking at frequency so much easier than the way I had previously done it. I'm running Matlab 2016b and so far everything has been working great. Thanks again

Fabricio Fernandez

HI, I'm trying to open the file LAS verified 3.0,( the function read_las_file(file,{'section','all'}); give error:(??? Reference to non-existent field
'curve_info'.) could any open this verified las 3.0 file ?

(MATLAB: (R2008b))


Eike Rietsch

A new version, SeisLab 3.02, is available. It fixes the obvious bugs created by the the new graphics system.

Lijun Zhu

s_plot.m problem fixed. The new Matlab use a different convention for gcf.m. This previously return a number but now a structure. The bug can be fixed by appending .Number to the figure_handle variable.

Lijun Zhu

I did some search and realize that MATLAB changed java from 2014a to 2014b. I just the buff is due to that.

Lijun Zhu

It seems that many seismic plot function, e.g. s_plot, s_cplot, are no longer compatible with the newest version of matlab (2015a). The specific error I got is is related to abs function. Apparently, an abs function is created for @struct class, but somehow, matlab still use the standard abs in the plot functions.

Ismot Jahan

I have a student licence for MatLab 2014a. For my research, I need to use SeisLab. So, I downloaded SeisLab 3.01 from File Exchange. But I was unable to use any functions and examples from Seislab using MatLab 2014a.

When I run a function or example, it gives me an error "Undefined function or variable 'ddid'.". I have never used SeisLab before. Please suggest me a solution to solve the problem.


seems like some function not supported on the 2014b version.

Puguh Hiskiawan

Guest, I have problem for running this program...
How should I run this program?


does it still has picking amplitude of individual traces capability? I thought S_spicks command achieves it but it is no longer seems to be available in the program suite.
I would like to know how I can pick these amplitude off from the seismic wiggle trace...Can somebody help?


Paul Edigbue

Anybody that knows how to generate synthetic 3D seismic trace, just about 12 or 24 traces, show pls help me. I need matlab code that could do it for me.

kaiba Wong

Hi there, I was using Seislab and for no reason it starts giving me error even after I re-downloaded it. I am having with this particular function: s_log2reflectivity

after running presets.. I get this error:
Error using struct/moperation (line 37)
Operation "*" is not defined for these two arguments

Error in * (line 15)

Error in l_curve (line 41)
beta = U'*b; beta2 = norm(b)^2 - norm(beta)^2;

Error in l_depth2time (line 194)

Error in s_log2reflectivity (line 64)

if anyone has a solution for this, it will be extremely helpful. Please let me know what is wrong. I did not alter the original code. Thanks in advance.


anusha js

Joseph Jennings


I need help using the l_compare function. When I attempt to compare different logs and change each log's depth so they all have the same vertical scale, I get the following error:

Error using assign_input (line 116)
There is a problem with the input arguments of function

Error in l_compare (line 95)

Error in Project3 (line 31)
l_compare({wellLog11, 'RILD',{'color','b'}, {'linewidth'

Does anyone know what I am doing wrong?

This is my code for the l_compare function:

l_compare({wellLog11, 'RILD',{'color','b'}, {'linewidth' 1},{'depths',4500,5000}},...
{wellLog13, 'RILD',{'color','b'}, {'linewidth' 1},{'depths',4500,5000}}, ...
{wellLog7, 'RILD', {'color','b'}, {'linewidth' 1},{'depths',4500,5000}}, ...
{wellLog18d, 'RILD', {'color','b'}, {'linewidth' 1},{'depths',4500,5000}}, ...
{wellLog15, 'RILD', {'color','b'}, {'linewidth' 1},{'depths',4500,5000}});

Thanks in advance.

Nam Nicholas



Pit D


I notice among the "list_of_seismic_functions" one call "s_insert_deviated_synthetic". But there's no corresponding m-file. Will this function be available soon?

Jorge Reveron

I have a problem with memblock function when I try to read a 3D segy file. The problem is that memblock uses the commamnd:


but textscan function requires how first argument a fid from file that it should be read.
Can I use an alternative function to scan 'feature(''memstats'')'?



Excellent! As promised it is faster than the previous versions. I checked reading a 566 MB segy file and found that it is 2 times faster than the previous code on a HP- Z600 workstation with 4 GB RAM.
Thanks a lot for such a nice contribution!

xiao gh

how can i get SEG-Y data?
I get the website (,but I can't find the place to download SEG-Y data.
Is somebody give some help?
thanks a lot!

Todd Bredbeck

Very useful set of tools, especially the IO capabilities.



Can this toolbox import 3D SEG-Y data? The graphic suggests yes, but I cannot figure out how to do this. An example would be most helpful.

Ravi Srivastava

Overall toolbox is excellent, except that its hard to use for big data set.
I would appreciate if some one could let me know proper example of l_trend_removal.m

li zhihui


Matthew Reilly

Xu Shanhui


Bian Aifei

Wen-Tao Ma

Sonny Winardhi

MATLAB Release Compatibility
Created with R2007a
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!