How can i read a text file?

2 次查看(过去 30 天)
Sanjeeb Behera
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 个评论
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