Skip to content
Snippets Groups Projects
Commit 971a5573 authored by leprob001's avatar leprob001
Browse files

Replaced string statements by char array for backward compatibility.

parent 9b2e81ab
No related branches found
No related tags found
No related merge requests found
......@@ -195,11 +195,11 @@ end
columnCount = length(lineAsDouble);
else
if (length(lineAsDouble) ~= columnCount)
warning( ...
"Expecting " + num2str(columnCount) + " columns in line " + ...
num2str(i) + " of section " + pTitle + ", but found " + ...
num2str(length(lineAsDouble)) + " columns. Line is being skipped!" ...
);
warning([ mfilename ...
'Expecting ' num2str(columnCount) ' columns in line ' ...
num2str(i) ' of section ' pTitle ', but found ' ...
num2str(length(lineAsDouble)) ' columns. Line is being skipped!' ...
]);
continue;
end
matrix = [matrix; lineAsDouble];
......
......@@ -17,7 +17,6 @@ function [ success ] = rfc(pFilename, pFloatDetails, pData, pTrajectory)
success = false;
%% Initialize variables required for processing
headerLineIndicator = "** ";
headerString = '';
dataString = '';
......
......@@ -15,7 +15,7 @@ function [ success ] = trj4(pFilename, pHeader, pData)
success = false;
%% Initialize variables required for processing
headerLineIndicator = "# ";
headerLineIndicator = '# ';
%% Parameter check
......@@ -55,7 +55,7 @@ preparedHeader = splitlines(pHeader);
fileString = '';
for i = 1:length(preparedHeader)
fileString = fileString + headerLineIndicator + preparedHeader{i} + newline;
fileString = [fileString headerLineIndicator preparedHeader{i} newline];
end
......@@ -71,7 +71,7 @@ for i = 1:size(pData, 1)
num2str(pData(i, 6), '%8.3f'),
num2str(pData(i, 7), '%8.3f'),
};
fileString = fileString + strjoin(line) + newline;
fileString = [fileString strjoin(line) newline];
end
%% Save to file
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment