How to pass the name of a file to a function - dataset
Show older comments
Dear all,
How can I create a function for loading an excel file into a dataset array in matlab?
I have tried something like this:
function tryB( X )
data=dataset('xlsfile',inputname(1));
end
But I get the following error each time.
Undefined function 'tryB' for input arguments of type 'char'.
Thank you,
Diego
Accepted Answer
More Answers (1)
Diego
on 7 Dec 2012
0 votes
Categories
Find more on Spreadsheets in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!