replace first elements from 1 col to numbers
显示 更早的评论
Hi, I have 26x1 cell matrix
s= {'O363'
'O321'
'null'
'O800'
'O411'
'O342'
'O820'
'O244'
'O13'
'O300'
'O623'
'O601'
'Z311'
'Z372'
'O811'
'Q738'
'O142'
'E039'
'B951'
'O64'
'G40'
'O11'
'E669'
'E059'
'I519'
'D65'
'O800'
'O411'
}
I want to replace first chars with numbers as:
s1 = [10363
10321
0
10800
10411
10342
10820
10244
1013
10300
10363
10601
11311
11372
10811
12738
10142
13039
14951
1064
1540
1011
13669
13059
16519
1765
10800
10411]
7 个评论
bero
2016-2-17
Stephen23
2016-2-17
I do not understand what you mean. Do you want the character codes to be randomly allocated to some numbers? If so, what is the set or range of values, and for what characters?
If you want help then you actually need to explain what you you need.
bero
2016-2-17
bero
2016-2-17
bero
2016-2-18
采纳的回答
更多回答(1 个)
Jos (10584)
2016-2-17
help strrep
help str2double
类别
在 帮助中心 和 File Exchange 中查找有关 Characters and Strings 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!