Matlab: fixed importing files from paths containing periods

This includes handling relative paths specified with '..'
This commit is contained in:
Ray Speth 2012-03-13 17:32:02 +00:00
parent 5274b1eca0
commit 45eae5b351
3 changed files with 6 additions and 6 deletions

View file

@ -32,8 +32,8 @@ function s = IdealGasMix(a,b,c)
% See also: ck2ctml, Solution
%
dotloc = findstr(a,'.');
if dotloc > 1
ext = a(dotloc:end);
if dotloc(end) > 1
ext = a(dotloc(end):end);
if ~strcmp(ext,'.inp')
if nargin == 1
s = Solution(a);

View file

@ -33,8 +33,8 @@ elseif nargin == 2
end
dotloc = findstr(infile,'.');
if dotloc > 1
idtag = infile(1:dotloc-1);
if dotloc(end) > 1
idtag = infile(1:dotloc(end)-1);
outfile = [idtag '.cti'];
else
idtag = infile;

View file

@ -30,8 +30,8 @@ elseif nargin == 2
end
dotloc = findstr(infile,'.');
if dotloc > 1
idtag = infile(1:dotloc-1);
if dotloc(end) > 1
idtag = infile(1:dotloc(end)-1);
outfile = [idtag '.xml'];
else
idtag = infile;