replace first elements from 1 col to numbers
Show older comments
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 Comments
bero
on 17 Feb 2016
Stephen23
on 17 Feb 2016
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
on 17 Feb 2016
bero
on 17 Feb 2016
bero
on 18 Feb 2016
Accepted Answer
More Answers (1)
Jos (10584)
on 17 Feb 2016
help strrep
help str2double
Categories
Find more on Characters and Strings in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!