How to fix "cell contents assignment to a non-cell array object" error?

Respuestas (1)

Not sure what you are trying to do here. tr is a cell array:
tr={1,2,3,4,5,6}
So accessing the contents of tr would either be with curly braces { } to get at the contents of the cell(s), or with parentheses ( ) to get at a subset of the cell array. I.e.,
tr{1} is the double scalar 1.0
tr(1) is a 1x1 cell array whose only element contains a double scalar with value 1.0
So what is this notation supposed to do for you:
tr[t+1]{k}.wind=rand;
You've got square brackets [ ] used inappropriately, as well as using the .wind notation to indicate that you are working with a structure, which you are not. Can you explain in more detail what you are trying to do here, and what the resulting cell array or structure is supposed to look like?

Categorías

Más información sobre Data Types en Centro de ayuda y File Exchange.

Etiquetas

Preguntada:

el 23 de Feb. de 2017

Editada:

el 2 de Mzo. de 2017

Community Treasure Hunt

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

Start Hunting!

Translated by