Filter löschen
Filter löschen

How can i read a text file?

1 Ansicht (letzte 30 Tage)
Sanjeeb Behera
Sanjeeb Behera am 15 Sep. 2016
Kommentiert: Sanjeeb Behera am 15 Sep. 2016
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 Kommentare
per isakson
per isakson am 15 Sep. 2016
Sanjeeb Behera
Sanjeeb Behera am 15 Sep. 2016
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.

Melden Sie sich an, um zu kommentieren.

Antworten (1)

KSSV
KSSV am 15 Sep. 2016
To read a textfile there are multiple options available.
doc load, importdata, textscan etc.,
  2 Kommentare
Sanjeeb Behera
Sanjeeb Behera am 15 Sep. 2016
Thank u for ur ans.
can u show me code?
Walter Roberson
Walter Roberson am 15 Sep. 2016
ContentOfFile = fileread('NameOfTheFileGoesHere.txt');

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Data Import and Export finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by