필터 지우기
필터 지우기

Question on creating a variable for a file

조회 수: 1 (최근 30일)
Megan Mirkhanian
Megan Mirkhanian 2020년 11월 24일
댓글: Rena Berman 2023년 11월 27일
I am trying to download files into the "file" variable. I am not sure for line 248 if I am doing this correctly. Also would you happen to know what the % in sprintf means.
  댓글 수: 2
Stephen23
Stephen23 2020년 11월 24일
"I am not sure for line 248 if I am doing this correctly"
Rather than concatenating together using [] you should use fullfile:
"Also would you happen to know what the % in sprintf means."
By itself, not much. But when combined with other characters it tells sprintf (and fprintf) how to represent the input data as text. In your code the format specifier %04d will print an integer value with four digits, using leading zeros if required. Format specifiers are explained here:
Rena Berman
Rena Berman 2023년 11월 27일
(Answers Dev) Restored edit

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

답변 (0개)

카테고리

Help CenterFile Exchange에서 Get Started with MATLAB에 대해 자세히 알아보기

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by