https://it.mathworks.com/help/matlab/ref/ncwrite.html
ncwrite - Write data to netCDF file - MATLAB
This MATLAB function writes the text or numeric data in vardata to an existing variable varname in the netCDF file filename.
write datanetcdffilematlab