Hello,
I have a char array like
'123456'
'123123'
when I use str2num, it gives me squares, not numerical values.
'□□□□□□'
'□□□□□□'
Can you help me to get these values numerically? Thank you.

댓글 수: 1

What is your actual "char array" data? Use a format that others can copy&paste and use directly in MATLAB.

댓글을 달려면 로그인하십시오.

 채택된 답변

Fangjun Jiang
Fangjun Jiang 2022년 6월 6일
a=['123456'
'123123']
a = 2×6 char array
'123456' '123123'
str2num(a)
ans = 2×1
123456 123123

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기

제품

릴리스

R2021b

질문:

2022년 6월 6일

댓글:

2022년 6월 6일

Community Treasure Hunt

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

Start Hunting!

Translated by