필터 지우기
필터 지우기

Numeric values converted to string

조회 수: 1 (최근 30일)
Davide Conti
Davide Conti 2019년 10월 30일
답변: Harsha Priya Daggubati 2019년 11월 4일
I have a matrix:
A = [ '3 5 6 8' ; 5 ; '1 19 21 26' ; '2,16,27,28' ; 26 ; '19,21' ]
How can i make a loop that returns the matrix B with numeric values converted to string?
B = [ '3 5 6 8' ; '5' ; '1 19 21 26' ; '2,16,27,28' ; '26' ; '19,21' ]

답변 (1개)

Harsha Priya Daggubati
Harsha Priya Daggubati 2019년 11월 4일
Hi,
I think it is not possible to create a matrix like A in MATLAB. If you have just provided matrix A as an example, I suggest using num2str function in MATLAB.
Hope this helps!

카테고리

Help CenterFile Exchange에서 Data Type Conversion에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by