Function using load command to load two monthly data files that are both .csv format
Info
This question is closed. Reopen it to edit or answer.
Show older comments
Hi there. I need to write a Function using load command to load two monthly data files that are both .csv format
I need to use the function [data1,data2]=loadtemps(file1,file2).
Im not sure how these will need to be called?
Answers (1)
Walter Roberson
on 19 Jun 2018
function [data1,data2]=loadtemps(file1,file2)
data1 = xlsread(file1);
data2 = xlsread(file2);
Which would be invoked like,
[first_data, second_data] = loadtemps('Starr.csv', 'Jagger.csv');
3 Comments
Stargazer
on 20 Jun 2018
Walter Roberson
on 20 Jun 2018
What you would invoke in the command window would be a line similar to what I showed,
[first_data, second_data] = loadtemps('Starr.csv', 'Jagger.csv');
If all went well, then the data would get stored in first_data and second_data
Stargazer
on 20 Jun 2018
This question is closed.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!