Commit dba93a7d authored by Pierre Cazenave's avatar Pierre Cazenave

Fix the horrible way in which the FUNCTIONS directory was added to the internal MATLAB path.

parent 547ed8e2
......@@ -37,7 +37,9 @@
% TMD release 2.02: 21 July 2010
function [amp,Gph,D,conList]=tmd_extract_HC(Model,lat,lon,type,Cid);
amp=[];Gph=[];D=[];conList=[];
w=what('TMD');funcdir=[w.path '/FUNCTIONS'];
w=which('TMD');
[wpath, ~, ~] = fileparts(w);
funcdir = fullfile(wpath, 'FUNCTIONS');
path(path,funcdir);
if type=='z',k=1;else k=2;end
[ModName,GridName,Fxy_ll]=rdModFile(Model,k);
......
......@@ -52,7 +52,9 @@
%
function [TS,conList]=tmd_tide_pred(Model,SDtime,lat,lon,ptype,Cid);
TS=[];conList=[];
w=what('TMD');funcdir=[w.path '/FUNCTIONS'];
w=which('TMD');
[wpath, ~, ~] = fileparts(w);
funcdir = fullfile(wpath, 'FUNCTIONS');
path(path,funcdir);
if ptype=='z',k=1;else k=2;end
[ModName,GridName,Fxy_ll]=rdModFile(Model,k);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment