I need to append some data to an existing variable in a netcdf file (.nc file). Say, if I have created a netcdf file as follows,
my_vardata = linspace(0,50,50);
ncid = netcdf.create('foo.nc','NC_WRITE')
dimid = netcdf.defDim(ncid,'my_dim',50);
my_varID = netcdf.defVar(ncid,'my_var','double',dimid)
Now I want to open the file and append the some new data, say new_data=(51:100) to my_vardata in the file. How can I achieve this?