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 comentario

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.

Iniciar sesión para comentar.

 Respuesta aceptada

Guillaume
Guillaume el 28 de Abr. de 2016
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 comentarios

Guillaume
Guillaume el 28 de Abr. de 2016
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.
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

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre MATLAB Report Generator en Centro de ayuda y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by