Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个垂直矩阵
names = { 11 22 33 44 55 }
我想将相同的字符串连接到所有喜欢的人
names = { 11nere 22nere 33nere 44nere 55nere }
我怎么能在matlab中做到这一点?
这一个班轮应该做到这一点
names = cellfun(@(x)[num2str(x), 'nere'], names, 'uniformoutput', false);
我假设names单元格数组包含数字条目而不是开头的字符串 - 否则它更简单,
names
names = cellfun(@(x)[x, 'nere'], names, 'uniformoutput', false);