Info

This question is closed. Reopen it to edit or answer.

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

1 view (last 30 days)
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 Comment
Jan
Jan on 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?

Answers (0)

This question is closed.

Community Treasure Hunt

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

Start Hunting!