Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

Function using load command to load two monthly data files that are both .csv format

조회 수: 7 (최근 30일)
Stargazer
Stargazer 2018년 6월 19일
마감: MATLAB Answer Bot 2021년 8월 20일
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?

답변 (1개)

Walter Roberson
Walter Roberson 2018년 6월 19일
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
Walter Roberson
Walter Roberson 2018년 6월 20일
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

이 질문은 마감되었습니다.

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by