Code covered by the BSD License  

Highlights from
choose_profile_limits

image thumbnail
from choose_profile_limits by Kevin Bartlett
Allows user to choose limits of oceanographic profile (e.g., CTD cast)

cpl_help()
function [] = cpl_help()
%
% cpl_help.m--Callback for the "Help" menu item.
%
% Syntax: cpl_help

% Developed in Matlab 7.0.1.24704 (R14) Service Pack 1 on GLNX86.
% Kevin Bartlett (kpb@uvic.ca), 2006-03-21 14:30
%-------------------------------------------------------------------------

fid = fopen('helptext.m');

if fid < 1
   errordlg([mfilename '.m--Could not find ''helptext.m'' file'],'cpl error','modal');
   return;   
end % if

helpStr = {};

while ~feof(fid)
   
   tline = fgetl(fid);      
   
   % Will only append line to help string if it is not a comment line.
   doAppend = 0;
   
   if length(tline)==0
      doAppend = 1;
   elseif tline(1)~='%'
      doAppend = 1;
   end % if
   
   if doAppend == 1
      helpStr{end+1} = tline;
   end % if
   
end % while

fclose(fid);

h = helpdlg(helpStr,'cpl Help');

%set(h,'WindowStyle','modal');

Contact us at files@mathworks.com