How to save chararcter matrix in single column in NetCdf file?

3 ビュー (過去 30 日間)
Vijay Sagar
Vijay Sagar 2022 年 8 月 4 日
回答済み: Udit06 2024 年 9 月 4 日
I have a character matrix which can be saved in a netcdf file. I am trying to save it in a single column but it is saving it in different rows and columns. Can someone suggest how to save it in a single column?
char_mat =['101670';'101670';'101670'];
nccreate('char_files.nc','char_mat',...
'Dimensions', {'x',size(char_mat,1),'y',size(char_mat,2)},...
'FillValue','disable','Datatype','char');
ncwrite('char_files.nc','char_mat',char_mat);

回答 (1 件)

Udit06
Udit06 2024 年 9 月 4 日
Hi,
The following MATLAB answer that handles the same issue that you are facing:

カテゴリ

Help Center および File ExchangeNetCDF についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by