Commit 43162c40 authored by Ricardo Torres's avatar Ricardo Torres
Browse files

fixed small bug in read_sms_mesh. Added explecit headerlines when reading...

fixed small bug in read_sms_mesh. Added explecit headerlines when reading elements in the triangulation table
parent a307264a
......@@ -183,10 +183,11 @@ lat = zeros(nVerts,1);
ts = zeros(nVerts,1);
% Skip the header
C = textscan(fid, '%s', nHeader + 1);
% C = textscan(fid, '%s', nHeader + 1,'Headerlines',nHeader); % why does it skip 3 lines when only two are in the header? Didn't use to throw errors though...
% if Meshname is more than one word the above would fail... Using
% headerlines as below is more safe proof.
% Read the triangulation table
C = textscan(fid, '%s %d %d %d %d %d', nElems);
C = textscan(fid, '%s %d %d %d %d %d', nElems,'Headerlines',nHeader);
tri(:, 1) = C{3};
tri(:, 2) = C{4};
tri(:, 3) = C{5};
......
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