Convert a matrix char to uitable

2 ビュー (過去 30 日間)
Victor Dalosto
Victor Dalosto 2018 年 1 月 22 日
回答済み: Walter Roberson 2018 年 1 月 22 日
Currently i have a 10x90 matrix, which consist basically of char/text in the following way
a = strcat('text', num2str(matrix(:,1)), 'text');
Anyone know a easier way for me to export it into a uitable of 10x1?
I cant export it directly since it isnt a numerical, logical or cell array. Making it a cell array by adding {} also doesnt work, since it became a 1x1. Also, i tryed to make a loop to convert the variable a into another one line by line, but the matlab gave me the following error: Subscript indices must either be real positive integers or logicals.
Sorry for the question, i'm new into matlab and programming.

採用された回答

Walter Roberson
Walter Roberson 2018 年 1 月 22 日
cellstr() the char array to make it into a cell array of character vectors. (Note: this will delete trailing blanks on each row.)

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeOperators and Elementary Operations についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by