Hi Poppy,
I understand that you would like to merge two NetCDF files which have same variables and dimensions. You can do this by reading the data from both the files using ncread function, then creating the schema of the new file using ncwriteschema function and finally writing the data to the new file using ncwrite function. You can find example here.
Note: If the files you are trying to merge are .cdf files and not .nc files, then you can use the CDF functions provided by MATLAB to do it yourself as shown here. Alternately you can use the CDFMerge tool provided by NASA as part of their CDF distribution. You can download the binary/zip specific to your OS from here.
Hope this helps!