To convert a string to a double in Matlab use the str2double
function. Here is an example:
main.m39 chars3 lines
This will convert the string '3.1416'
to the number 3.1416
. Note that if the string cannot be converted to a number then the result will be NaN
(Not a Number).
gistlibby LogSnag