for e.g. I can write a command like
[a b]= textread('F: \experimentalresults\sample1.txt',......) in windows and its fine.
How do I write while using a Mac.....
the approach [a b] = textread('Users/username/experimentalresults/sample.txt',....) is not wroking !!
*************
I am using MBP intel core, OS X (version 10.6.6) and Matlab2010_b.
What is the error you get? Are you sure you specify the correct path, and/or the correct format identifiers?
It is working perfectly fine here (10.6.6 + 2010b)
Jos
textread('/Users/username/experimentalresults/sample.txt',....)
When there is no leading '/', names are interpreted as being relative to
the current directory.
hi again
i m getting ??? Error using ==> textread at 167
File not found.
Yes i used leading '/', still the error message
identifiers and rest syntax is fine, its working in windows.
>> textread('/Users/username/experimentalresults/sample.txt',....)
> hi again i m getting ??? Error using ==> textread at 167
> File not found.
You know that where you have put username, that you have to put the
actual username? e.g.,
'/Users/roberson/experimentalresults/sample.txt'
i even changed the slashes but didnt work out
Mac OS X *never* uses \ as a directory separator.
/Users/gauravs/experimentalresults/44.txt
is plausible.
Are the results in a folder that appears on your desktop? If so then it
would be
/Users/gauravs/Desktop/experimentalresults/44.txt
I suggest that you enter Matlab, and at the command prompt, type
!find /Users/gauravs -name 44.txt -print
Notice the exclamation mark at the beginning of the command.
If nothing shows up then the files are not under that account. If
something shows up, it will have the exact path you need to use to open it.