Cell String length limitation on Table

10 vues (au cours des 30 derniers jours)
Ziad Abou wasa
Ziad Abou wasa le 26 Avr 2017
Commenté : Stephen23 le 29 Avr 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 commentaires
Peter Perkins
Peter Perkins le 28 Avr 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 le 29 Avr 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.

Connectez-vous pour commenter.

Réponses (0)

Catégories

En savoir plus sur Data Type Identification dans Help Center et File Exchange

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by