"Nhan Nguyen" <
nepth...@gmail.com> wrote in message <hkt0vh$ko9$
1...@fred.mathworks.com>...
> lets say I got a string C = "this is for testing1", how do I get that value 1 in that string into an integer? I know I can find the length(C) then what? There's fgets and fread but I don't know how to setup those functions up to find that value 1 at the end of that string.
For your specific example:
C = 'this is for testing1'
h = C(end)
answer = str2num(h)