Could someone explain why the following code works fine, but if I uncomment any one of the
". The files being read are 100,000 by 64 floating points numbers each.
%% Compare cvode solutions after rearranging RHS function.
clear;
p=5;
N=2^p;
srcNew = '/raid/fpuData/'; % OCTAVE
srcOld = '/raid/fpuData/bak/'; % OCTAVE
tgt = '/raid/fpuData/'; % OCTAVE
ftype = '_forward.U.csv'; % OCTAVE
tmplt='N=%04d_Beta=%05.2f_tol=1e-08_t=00000'; % OCTAVE % 1-dimension
betas = 4; 12:-1:4;
for beta = betas
fn=sprintf(tmplt, N, beta); % 1-dimension
tic;
fprintf('Loading %s...\n', [srcNew fn ftype]);
%fflush(stdout());
uNew = csvread([srcNew fn ftype]); toc;
fprintf('Loading %s...\n', [srcOld fn ftype]);
%fflush(stdout());
uOld = csvread([srcOld fn ftype]); toc;
deltaU = abs(uNew - uOld)/uOld;
fn = sprintf('N=%04d_Beta=%02.0f_delta.csv', N, beta)
fprintf('Saving %s...\n', [tgt fn]);
%fflush(stdout());
csvwrite([tgt fn], deltaU); toc;
end