Functions | |
eval (s,"m = [];") | |
if (ischar(m)) m | |
endif else | print_usage () |
endif endfunction | !assert (str2num("-1.3e2")==-130 &&str2num("[1, 2; 3, 4]")==[1, 2;3, 4]) |
!error | str2num () |
!error | str2num ("string", 1) |
Variables | |
function | m |
sep = ";" | |
s = sprintf ("m = [%s];", reshape ([s, sep]', 1, nr * (nc + 1))) |
endif endfunction !assert | ( | str2num("-1.3e2") | = =-130 &&str2num("[1, 2; 3, 4]")==[1 , |
|
2; | 3, | |||
4] | ||||
) |
eval | ( | s | ) |
if | ( | ischar(m) | ) |
!error str2num | ( | "string" | , | |
1 | ||||
) |
!error str2num | ( | ) |
sep = ";" |