필터 지우기
필터 지우기

How to convert character matrix into numeric matrix ? Can you share code for that?

조회 수: 1 (최근 30일)
bavani marimuthu
bavani marimuthu 2017년 11월 27일
댓글: Stephen23 2017년 11월 28일
I have created a matrix that accepts the text file called pub.txt and content in that file is Hello word alone..and displayed it .
str=fileread('pub.txt')
str =
Hello Bava
Hi Hi
Hi Hi
Now, I want to convert this character matrix into numeric matrix ? Plz help
  댓글 수: 14
bavani marimuthu
bavani marimuthu 2017년 11월 28일
If my .txt file contains the character called 'Hello' .. Then Whether is there any possibilities to convert it into numeric matrix from character matrix which contains the character in it..
Stephen23
Stephen23 2017년 11월 28일
double('Hello')
will convert the char matrix into a numeric matrix.

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

답변 (0개)

카테고리

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