How to read file from excel in MATLAB
Mostrar comentarios más antiguos
Hi, I'm trying to read a file from excel in matlab. However whenever I use xlsread, it gives me this message: LS= xlsread('Lake Superior Temperatures.xlsx') Error using xlsread (line 132) XLSREAD unable to open file 'Lake Superior Temperature.xlsx'. File '/Users/sa/Documents/MATLAB/Lake Superior Temperature.xlsx' not found.
The file is in documents but for some reason it cant find it? Where should I save the excel document so that matlab can read it properly? I'm using a MacBook Pro and I'm sort of new at it so any help would be very much appreciated!
Respuestas (1)
You need to give a full path including the drive.
e.g. on my machine that would be:
'C:/users/...'
It cannot find the path starting with just:
'/users/...'
This can be verified by the simple test:
>> dir( '/Users/' )
'/Users/' not found.
>> dir( 'C:/Users/' )
. All Users Default User Public desktop.ini
.. Default etc etc
Categorías
Más información sobre Spreadsheets en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!