Undefined function 'readlas' for input arguments of type 'char'

1.7k Views Asked by At

I just bought the student version of Matlab 2013. I have three well log files (.las) and I have downloaded them onto my computer.

When I open matlab I think it has to deal with either retrieving the .las file, or setting the path to get the functions. When I try to even type help readlas it gives me this error:

"Undefined function 'readlas' for input arguments of type 'char'."

Where do I set my path? How do I let Matlab access those three well log .las files?

2

There are 2 best solutions below

0
On

Installing Matlab toolboxes


This looks to be a question about how to install a Matlab toolbox so that Matlab can find it. These look like the relavant links

how to install a toolbox to matlab if I do not have administrative authorization

How to install toolbox for MATLAB

How do I add a new toolbox to my already installed Matlab version?


Matlab tools to read LAS (Log-Ascii-Standard) files.


Readlas

readlas looks to be part of CREWES Matlab toolbox:
https://www.crewes.org/ResearchLinks/FreeSoftware/

Description https://www.crewes.org/ForOurSponsors/ResearchReports/2013/CRR201331.pdf

The CREWES Matlab toolbox contains a script called readlas that has long had the ability to read version 1.2 and version 2.0 Log ASCII Standard (LAS) files. A new Matlab class called las that can handle all LAS versions has been written. The constructor reads an entire LAS file into memory and splits it into a Matlab cell string array using regular expressions. The readlas script is now a wrapper that creates a new las object and returns version 2.0 inputs suitable for logedit and syngram regardless of the LAS version of the input file. Since logedit and syngram cannot handle the multiple log data sections or logs containing character data (eg. lithology) that are allowed in LAS 3.0 files, or more than ten logs effectively, readlas provides graphical user interface (GUI) windows that prompt users to pick which log data section they would like to work on, and decide which logs within that section they want to edit. It also replaces any log character data with log null (numeric) values. The original readlas (pre 2013) is still available in the toolbox as readlas_old.

Las Toolbox

https://github.com/MosGeo/LasToolbox

A LAS file format toolbox for reading Las files in Matlab. All information is loaded in a structured format including headers.

Currently, the code can only be used with LAS version 2. LAS version 3 is not currently supported.

0
On

MATLAB does not have any built-in capability to read LAS well log files. There is no function readlas supplied with MATLAB. If you have a program that uses a command readlas, you will need to contact the author of the program to obtain the code for readlas, and then add the directory containing readlas to your path. If you already have readlas, then just add its directory to the path.

There are freely available third-party tools that can read LAS files into MATLAB - one of the most common is Seislab, available here from the MATLAB Central File Exchange. However:

  1. It's likely that the way Seislab reads in LAS data differs from the way your readlas reads it in, and I would doubt that you can simply replace your readlas with Seislab's read_las_file without changing quite a few other things.
  2. Seislab is in general a horrible piece of software that I do not recommend you use unless you really have to.

Hope that helps!