Converting Strings to Numbers in MATLAB: A Quick Guide

  • Thread starter Thread starter vky
  • Start date Start date
  • Tags Tags
    Convert String
Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
2 replies · 4K views
vky
Messages
6
Reaction score
0
how to convert string to num??

hi guys,

I'm currently doing a GUI on MATLAB and I'm taking in a user input in a text box as string(not sure as wat), how can I convert it to a number?
Any help on that, much appreciated.
Thanks
 
Physics news on Phys.org
there's lots of different ways, some work better than others (experiment to find out which work for you)...

str2num, sscanf, strread
 
HI, thanks for your help, str2num does work.
cheers