How to replace values of a variable in a table (in a cell) with nan?

6 visualizaciones (últimos 30 días)
Hi all,
I have a 10x1 cell containg 100x32 tables.
I want to:
mycell{5, 1}.myvariable = nan;
which results in:
Error using .
To assign to or create a variable in a table, the number of rows must match the height of the table.
How can I write the code to replace the values of a specified variable with nan?
Can you help please?
  2 comentarios
Tomaszzz el 4 de Oct. de 2022
Thanks@Rik. Unfortunately the same error.

Iniciar sesión para comentar.

Respuesta aceptada

VBBV el 4 de Oct. de 2022
mycell{5, 1}(1,1).myvariable = nan;
  2 comentarios
Tomaszzz el 4 de Oct. de 2022
ok now it works;
mycell{5, 1}.myvariable(:,1) = nan;

Iniciar sesión para comentar.

Más respuestas (0)


Más información sobre Tables en Help Center y File Exchange.


Community Treasure Hunt

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

Start Hunting!

Translated by