I have been messing with this for a while now but have no clue what to change. The error is in line 4, any ideas?

 채택된 답변

Stephan
Stephan 2018년 9월 20일
편집: Stephan 2018년 9월 20일

3 개 추천

Hi,
path = 'C:\Users\Stephan\Desktop';
filename = 'test.xlsx';
fullpath = [path, '\', filename];
data = xlsread(fullpath,'A1:B2');
is one possibility of solving this problem.
Also join would work:
path = "C:\Users\Stephan\Desktop";
filename = "test.xlsx";
fullpath = join([path, filename],"\");
data = xlsread(fullpath,'A1:B2');
Note that double quotes are used now.
Best regards
Stephan

댓글 수: 1

Anthony Voccia
Anthony Voccia 2018년 9월 20일
Thanks! I used the first one and modified data= and elong= which made them both work.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Develop Apps Using App Designer에 대해 자세히 알아보기

질문:

2018년 9월 20일

댓글:

2018년 9월 20일

Community Treasure Hunt

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

Start Hunting!

Translated by