str2num conversion for vectors

1 view (last 30 days)
Hello! About str2num conversion..
This is what I found in the Matlab help: A = str2num('uint16(500)') A = 500
class(A)
ans =
uint16
I want to do this for a vector like: A = str2num('uint16(500 300 100)') The result will be: A= [];
How can I solve this problem?
Thanks!

Accepted Answer

Andrei Bobrov
Andrei Bobrov on 11 Apr 2012
A = str2num('uint16([500 300 100])')

More Answers (0)

Categories

Find more on MATLAB 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!