Cell String length limitation on Table

8 visualizaciones (últimos 30 días)
Ziad Abou wasa
Ziad Abou wasa el 26 de Abr. de 2017
Comentada: Stephen23 el 29 de Abr. de 2017
Hello, I am using a table to store information. One of the variables is a string of the path to a file that was used to derive the information on that row. The point is I need to access the full data later, but need to keep track of some statistical computations in the table. The problem is, the variable is set to a specific size (apparantly the first entry of the first row) If i try editing the entry to add a longer or shorter cell string, I get the error: "Subscripted assignment dimension mismatch for table variable 'XX_LOC'" I've tried several approaches like indexing the actual char locations like: TABLE(ROW,:).XX_LOC(1:length(LOCATION)) = LOCATION This solves the problem for shorter cells but crashes for longer (since I am referencing a location larger than the variable length).
Any Ideas how I can work with text in a variable of a table?
Thanks
  2 comentarios
Peter Perkins
Peter Perkins el 28 de Abr. de 2017
Assuming that TABLE.XX_LOC is a cell array containg char row vectors (a "cellstr"), then this
TABLE(ROW,:).XX_LOC(1:length(LOCATION))
does NOT "index the actual char locations". That's probably the source of your trouble. I think you need to provide a short clear example of what you have and what you are trying to do.
Stephen23
Stephen23 el 29 de Abr. de 2017
It is quite unlikely that
TABLE(ROW,:).XX_LOC(1:length(LOCATION)) = LOCATION
is doing anything useful. Please give use a complete working example that we can try.

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Data Type Identification en Help Center y File Exchange.

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by