How to keep metadata with the parameters?

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

 Réponse acceptée

KALYAN ACHARJYA
KALYAN ACHARJYA le 26 Nov 2019
Modifié(e) : KALYAN ACHARJYA le 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 commentaire

Sofia Stella
Sofia Stella le 28 Nov 2019
Modifié(e) : Sofia Stella le 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

Connectez-vous pour commenter.

Plus de réponses (0)

Community Treasure Hunt

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

Start Hunting!

Translated by