str2num conversion for vectors

조회 수: 3 (최근 30일)
Diana Acreala
Diana Acreala 2012년 4월 11일
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에서 Data Types에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by