Code covered by the BSD License  

Highlights from
SeisLab 3.01

image thumbnail

SeisLab 3.01

by

 

24 Jul 2007 (Updated )

Release 10.0301 of a collection of functions for analysis/display of seismic and well-log data.

ple(s)
function ple(s)
%PLE "Print Last Error"
%
% ple
% ple(s)
%
% If an error structure is supplied, it is used instead of lasterror

if nargin < 1
   s = lasterror;
end

if isempty(s.message)
   fprintf(1,'No error message stored\n');
   return;
end

fprintf(1,'Last Error: %s (%s)\n',s.message,s.identifier);
for i=1:numel(s.stack)
   e = s.stack(i);
   ff = which(e.file);
   [ignore_dir,command] = fileparts(ff);
   n = e.name;
   href = sprintf('matlab:opentoline(''%s'',%d)',ff,e.line);
   if strcmp(command,n)
       % main function in this file
       fprintf(1,'    <a href="%s">%s,%d</a>\n',href,ff,e.line);
   else
       % subfunction in this file
       fprintf(1,'    <a href="%s">%s >%s,%d</a>\n',href,ff,n,e.line);
   end
end
fprintf(1,'\n');

Contact us