Cell String length limitation on Table
10 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
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 Commenti
Peter Perkins
il 28 Apr 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
il 29 Apr 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.
Risposte (0)
Vedere anche
Categorie
Scopri di più su Data Type Identification in Help Center e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!