Info

Cette question est clôturée. Rouvrir pour modifier ou répondre.

Undefined function or variable 'rowCol' when calling nccreate(n​cfilename,​VarName,'D​imensions'​,{});

1 vue (au cours des 30 derniers jours)
Camille Couzi
Camille Couzi le 18 Mar 2019
Clôturé : MATLAB Answer Bot le 20 Août 2021
hi,
I am creating an nc file using nc create.
I have a valid nc file name, test.nc, and i want to create the variable LATITUDE with no dimensions (it's just a number):
VarName=LATITUDE
nccreate(ncfilename,VarName,'Dimensions',{});
I get the following error:
Undefined function or variable 'rowCol'.
Error in nccreate (line 112)
varargin{index} = rowCol;
Error in Struct_2_NCFile (line 38)
nccreate(ncfilename,VarName,'Dimensions',{});
I have tried reading the script in nccreate.m and i can see there is an issue in the following line but can't understand what's happening.
for i = 1:length(cellArray)
rowCol{i} = convertStringsToChars(cellArray{i}); %#ok<AGROW>
end
I can't find anything on the internet to solve this. Your help is greatly appreciated!!!
  1 commentaire
Jan
Jan le 18 Mar 2019
The error message tells you, that the problem occurs in:
Error in nccreate (line 112)
varargin{index} = rowCol;
Why do you assume, that the problem is here:
for i = 1:length(cellArray)
rowCol{i} = convertStringsToChars(cellArray{i}); %#ok<AGROW>
end
?
Are you sure that specifying the 'Dimensions' as empty cell is correct?

Réponses (0)

Cette question est clôturée.

Community Treasure Hunt

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

Start Hunting!

Translated by