You don't need to be an 'investor' to invest in Singletrack: 6 days left: 95% of target - Find out more
Hi all,
Really stupid question. Trying to import data from a spreadsheet into MATLAB (2013a) using xlsread.
How do I tell MATLAB where the file is located? If I put in;
num = xlsread ('MATLABtest.xlsx')
It says
XLSREAD unable to open file 'MATLABtest.xlsx'.
File 'C:\Users\Duane\MATLABtest.xlsx' not found.
As that is not where the file is. If I move the file to C:\Users\Duane, it imports fine, but obviously I don't want all my files there.
Ta,
Duane.
as default it'll look in the folder you are currently working in, which I assume is C:\Users\Duane.
If you want to look elsewhere then use:
num = xlsread('C:\Blah\blah\blah\filename.xls')
or use this:
[Filename, Pathname] = uigetfile('C:\*.xls');
num = xlsread([Pathname '\' Filename]);
Cheers bud!