Cell String length limitation on Table
조회 수: 8 (최근 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!