![]() These method is suitable for relatively small tables, as the round trip table/cellarray/table plus the call to cellfun will probably be quite slow for larger tables. Notice that we had to recreate the column names (copied from the initial table), as these are not transferred into the cell array during conversion. Produces a new table containing only strings. T3.Properties.VariableNames = T.Properties.VariableNames T3 = cell2table( cellfun(, table2cell(T), 'uni',0) ) I recreated a table with the same data than in your example. There are 2 possible way to work around that to convert all your values to character arrays: num2str() is also valid), but it will bomb out if you try to throw a cell array at it (even if all your cells are numeric). ![]() However, it can deal with purely numeric arrays (e.g. Yes, num2str accept a single variable of any type and will return a string, so all these operations are valid: > num2str('123')
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |