Info

此问题已关闭。 请重新打开它进行编辑或回答。

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

1 次查看(过去 30 天)
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 个评论
Jan
Jan 2019-3-18
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?

回答(0 个)

此问题已关闭。

Community Treasure Hunt

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

Start Hunting!

Translated by