Skip to content
Permalink
master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
max_time = 25;
[x] = 30.15:0.1:69.85; % create x value
[y] = -24.85:0.1:44.85; %Create y Value
%Extracts data to a 4dArray
for currentHour = [1 max_time]
pathCBE = "C:\Users\user\Documents\Me\Uni\Big Data\Code\24Hour\24HR_CBE_"+ num2str(currentHour,'%02d')+ ".csv";
pathORG = "C:\Users\user\Documents\Me\Uni\Big Data\Code\24Hour\24HR_Orig_"+ num2str(currentHour,'%02d')+ ".csv";
CBE(:,:,currentHour) = csvread(pathCBE);
ORG(:,:,currentHour) = csvread(pathORG);
end
NumProcessors = 4; % change this to vary the number of processors used
if isempty(gcp('nocreate')) % check if we already have a parallel pool?
parpool(NumProcessors);
end
compared = zeros(size(CBE));
loop1size = size(CBE,1);
tic
for idx3 = [1 max_time]
parfor idx2 = 1:size(CBE,2)
for idx1 = [1 loop1size]
compared(idx1, idx2, idx3) = CBE(idx1, idx2, idx3) - ORG(idx1, idx2, idx3)
end
end
end
toc