Cell String length limitation on Table
10 ビュー (過去 30 日間)
古いコメントを表示
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 件のコメント
Peter Perkins
2017 年 4 月 28 日
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
2017 年 4 月 29 日
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.
回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Data Type Identification についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!