Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Matlab text file reading and passing o fnction

Status
Not open for further replies.

Waqas Mughal

Newbie level 4
Joined
Aug 5, 2010
Messages
5
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
Islamabad
Activity points
1,308
Hello!
i need ur help urgently!

Iread my text file by the function text=fread('textfile.txt');

then i have to pass this data to my function in matlab which takes input as string but my string data read from text file is in a string.
but i have to pass string in my function as myfunction('TXT');


how i can solve this problem?

thanks in advance
 

Try fgetl or fgets to read a line as text.
 

can u tell me the code how to use fgetl or fgets.
i tried already but was unable o use!
 

The matlab help is your friend, try: "help fgetl" or "doc fgetl" for an example.
Maybe you want to read the whole file, try: text = fileread('your.file')
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top