Please find attached the program that contents all the parameters for the error programs
so this is the error that i get
Cell contents assignment to a non-cell array object.
Error in create_grid (line 60)
nw{'xl'} = ncdouble('one');
% Create variables and attributes
%
nw{'xl'} = ncdouble('one');
nw{'xl'}.long_name = ncchar('domain length in the XI-direction');
nw{'xl'}.long_name = 'domain length in the XI-direction';
nw{'xl'}.units = ncchar('meter');
nw{'xl'}.units = 'meter';
Error in make_grid (line 76)
create_grid(L,M,grdname,ROMS_title)
% Create the grid file
%
disp(' ')
disp(' Create the grid file...')
[M,L]=size(Latp);
disp([' LLm = ',num2str(L-1)])
disp([' MMm = ',num2str(M-1)])
create_grid(L,M,grdname,ROMS_title)
%

1 件のコメント

Walter Roberson
Walter Roberson 2016 年 4 月 28 日
You did not include the code for make_grid or create_grid
romstools appears to refer to ROMS AGRIF Project . That project requires signing up to download the code.

サインインしてコメントする。

 採用された回答

Guillaume
Guillaume 2016 年 4 月 28 日

0 投票

nw{'xl'} = ...
is not valid matlab syntax. Why are you indexing a cell array with a string?
Note that while
nw('xl') = ...
%or
[nw{'xl'}] = ...
may be valid matlab syntax, it's very unlikely that it is what you meant.

3 件のコメント

Jan
Jan 2016 年 4 月 28 日
Guillaume
Guillaume 2016 年 4 月 28 日
It would still be invalid syntax. Curly braces indexing for a table requires two arguments: the rows and the columns. See here. Moreover, the indexing would have to return a scalar structure or object for the subsequent lines in the OP post to work.
There may be some toolbox object that overrides subsref for {} so that the original syntax works but without more info from the OP, it's not valid.
Jose Alberto Santos de la Serna
Jose Alberto Santos de la Serna 2016 年 5 月 13 日
Finally it was just because I wasn't in the path, actually I included it but after doing "pw" I wasn't inside it so it maked matlab crash dont know why

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File Exchange で MATLAB Report Generator についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by