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
%% Replaces one hours worth of data with NaN
clear all
close all
OriginalFileName = '/Users/juhildungrani/Desktop/Sem 4/Big Data/work/5011CEM2021-dungranij/2a Data Exploration';
NewFileName = './Model/TestFileNaN.nc';
copyfile(OriginalFileName, NewFileName);
C = ncinfo(NewFileName);
ModelNames = {C.Variables(1:6).Name};
%% Change data to NaN
BadData = NaN(700,400,1);
%% Write to *.nc file
Hour2Replace = 12;
for idx = 1:8
ncwrite(NewFileName, ModelNames{idx}, BadData, [1, 1, Hour2Replace]);
end