Info
此问题已关闭。 请重新打开它进行编辑或回答。
help with creating certain function for setting elements in one matrix to another
2 次查看(过去 30 天)
显示 更早的评论
want to make function that takes in text, and then creates a matrix that sets each element to one of the ascii code elements
for example: [abcdef] would get set to [1 2 3 4 5 6]
and [help] would get set to [8 5 12 16]
pls help
0 个评论
回答(1 个)
the cyclist
2017-11-4
Here's one way:
alphabet = 'abcdefghijklmnopqrstuvwxyz';
[~,vec] = ismember('help',alphabet)
9 个评论
此问题已关闭。
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!