str2num conversion for vectors

1 次查看(过去 30 天)
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!

采纳的回答

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

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 MATLAB 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by