Filter löschen
Filter löschen

Question on creating a variable for a file

1 Ansicht (letzte 30 Tage)
Megan Mirkhanian
Megan Mirkhanian am 24 Nov. 2020
Kommentiert: Rena Berman am 27 Nov. 2023
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 Kommentare
Stephen23
Stephen23 am 24 Nov. 2020
"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 am 27 Nov. 2023
(Answers Dev) Restored edit

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Kategorien

Mehr zu Get Started with MATLAB finden Sie in Help Center und File Exchange

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by