The prof asked us to start the assignment with C:\ and then get to the file somehow? This isn't really working for me.
Am I doing anything wrong?
02-07-2011 at 08:09 PM
#6
jajas
Account Disabled by User
Join Date: Jun 2010
Posts: 254
Thanked:
15 Times
Liked:
49 Times
Can you clarify what you mean by starting the assignment with C:\ ?
But all that means is you are defining a path (link) inside your hard drive to where the file you are going to be using is located.
If you paste the code and a sample of the text file you have so far in this thread I could try debugging it.
02-07-2011 at 08:14 PM
#7
ishk33
Senior Member
Join Date: Jul 2008
Posts: 215
Thanked:
4 Times
Liked:
12 Times
For example: My text file is called abc.txt
So I was asked to start it this way:
C:/
dir
cd temp
dir
load abc.txt
02-07-2011 at 08:32 PM
#8
jajas
Account Disabled by User
Join Date: Jun 2010
Posts: 254
Thanked:
15 Times
Liked:
49 Times
Sorry, I am not familiar with this method. Try following the steps on the second link I sent you. It should guide you through it. I was never constrained to using just text files so I am only accustomed to spreadsheets.
02-07-2011 at 08:44 PM
#9
AnguishedEnd
Elite Member
Join Date: Aug 2008
Posts: 781
Thanked:
89 Times
Liked:
103 Times
Quote:
Originally Posted by ishk33
For example: My text file is called abc.txt
So I was asked to start it this way:
C:/
dir
cd temp
dir
load abc.txt
Code:
userpath('C:/<file directory here>')
dir
fid = fopen('<filename>.txt');
F = fread(fid, '*char')'
fclose(fid);
McMaster University News and Information, Student-run Community, with topics ranging from Student Life, Advice, News, Events, and General Help.
Notice: The views and opinions expressed in this page are strictly those of the student(s) who authored the content. The contents of this page have not been reviewed or approved by McMaster University or the MSU (McMaster Students Union). Being a student-run community, all articles and discussion posts on MacInsiders are unofficial and it is therefore always recommended that you visit the official McMaster website for the most accurate up-to-date information.