필터 지우기
필터 지우기

How can i read a text file?

조회 수: 1 (최근 30일)
Sanjeeb Behera
Sanjeeb Behera 2016년 9월 15일
댓글: Sanjeeb Behera 2016년 9월 15일
Hi I am using rsa encryption of text message. During read of a message I want to read a text file? How can I read? Can u tell me? Here my code is
m=input('\nEnter the message: ','s');
  댓글 수: 2
per isakson
per isakson 2016년 9월 15일
Sanjeeb Behera
Sanjeeb Behera 2016년 9월 15일
But in above code same program has been written. I want to read the text file where more than thousand characters are written instead of a single text message.

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

답변 (1개)

KSSV
KSSV 2016년 9월 15일
To read a textfile there are multiple options available.
doc load, importdata, textscan etc.,
  댓글 수: 2
Sanjeeb Behera
Sanjeeb Behera 2016년 9월 15일
Thank u for ur ans.
can u show me code?
Walter Roberson
Walter Roberson 2016년 9월 15일
ContentOfFile = fileread('NameOfTheFileGoesHere.txt');

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

카테고리

Help CenterFile Exchange에서 Data Import and Export에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by