Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
Mathematics
General TopicsResearchOperations ResearchStatisticsMathematical LogicNumerical AnalysisUndergraduate MathAlgebra HelpRecreational Math
Math Software
MapleMathematicaMATLABScilabSASSPSS

Math Forum / Math Software / MATLAB / July 2008



Tip: Looking for answers? Try searching our database.

Using the fopen command

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Markthomas - 17 Jul 2008 04:04 GMT
I am using the fopen command but ran into some syntax
difficulty;

i read in the file name from a text file like this:

id = fopen('D:\Files.txt')
FileName = fgetl(id)

then i want to do something like this:
directory = 'D:\Input\'
fid = fopen(directory FileName) ---- just to show an example
or
fid = fopen('D:\Input\'FileName) --- but i think i am
missing something.  Any help would be nice!

Markthomas
Donn Shull - 17 Jul 2008 04:29 GMT
To concatinate strings together you can sue the syntax

[str1, str2]

or

cat(str1, str2)

you should also probably look at the functions

fileparts and fullfile as these could be very useful to you.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2010 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.