フィルターのクリア

How to truncate text in an array

16 ビュー (過去 30 日間)
James
James 2014 年 4 月 8 日
回答済み: dpb 2014 年 4 月 8 日
Hi,
I have a very large text array "txt" that has a lot of various info in it. In cell (1,2) there is the decription of the file that I am analyzing. This description is a lot longer than I care to show. For example, the decription in the cell is "Description 1234567890" and I want to pull the text out of that cell and into another 1x1 array so I can put it in a text box, but truncate down the text to "Description 123". How would I do that?
Thank you.

採用された回答

dpb
dpb 2014 年 4 月 8 日
As
c{1,2}(1:desiredlength)
Look up Multilevel Indexing to Access Parts of Cells in the doc under Cell Arrays in the section on Data Types under Language Fundamentals

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeCell Arrays についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by