Clear Filters
Clear Filters

How to keep metadata with the parameters?

3 views (last 30 days)
Hello,
I have my parameters opened in the Workspace but I need to keep, from metadata of the dataset, the units of each parameter (which now have just data at all).
So, How can I keep them with every each parameter in a simple way?
I put here down an example of variable I need, but I'm not able to choose right.
% var17
% Size: 31x189
% Dimensions: N_SAMPLES,N_STATIONS
% Datatype: single
% Attributes:
% long_name = 'Water body pH'
% units = 'pH units'
% comment = 'Codes: SDN:P35::EPC00168 SDN:P06::UUPH'
% ancillary_variables = 'var17_qc'
% C_format = '%.2f'
% FORTRAN_format = 'F12.2'
% _FillValue = -10000000000
Thank you
Sofia Stella

Accepted Answer

KALYAN ACHARJYA
KALYAN ACHARJYA on 26 Nov 2019
Edited: KALYAN ACHARJYA on 26 Nov 2019
text file (writetable)
or
%code (Automatically save all dispaly data in text file, do clear and save again)
diary on
%Display in Command window
diary off
  1 Comment
Sofia Stella
Sofia Stella on 28 Nov 2019
Edited: Sofia Stella on 28 Nov 2019
Hi,
I tried but it doesn't work correctly.
I try to explain better my question to get better help about.
I have NetCDF file. In this, there is a variable, which i need just its UNITS a part (but I don't know how format could be...a spreadsheet?).
From the script I don't need all the metadata, but just the UNIT.
Now I'm trying with function: ncinfo --> fileInfo = ncinfo(fileName)
Could you help me?
Best regards
Thanks

Sign in to comment.

More Answers (0)

Categories

Find more on Data Import and Analysis in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!