load matrix with variable from text file using fileread

조회 수: 1 (최근 30일)
polo Mahmoud
polo Mahmoud 2020년 2월 15일
댓글: Giuseppe Inghilterra 2020년 2월 15일
Hi I have a matrix eg :
[ 1 2 3 J
4 5 6 J];
I want to load this into matlab but the letter turns into NaN, i want to import the matrix into matlab then herafter ( in Matlab) define/give a value to ( J )
eg:
J = 2
I have used fileread, which is good for numbers, but turns letters to NaN
  댓글 수: 1
Giuseppe Inghilterra
Giuseppe Inghilterra 2020년 2월 15일
Can you attach a txt file sample? When I use fileread on my own I obtain a character vector and I don't have the behaviour (NaN values) that you have described.

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

답변 (0개)

카테고리

Help CenterFile Exchange에서 Other Formats에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by