Variable as placeholder in an "fopen" statement
Show older comments
Still on the issue of a place holder , I am trying to write a code to name the output folder by subject name, I know typically it goes into the braces but this time arround it is not working
''
subject = "PO1"
fid = fopen(['/Users/addison/Documents/Data/"Results2"+{subject}.xls'],'w');
''
1 Comment
"I know typically it goes into the braces..."
with Python's Formatted String Literals: https://docs.python.org/3/tutorial/inputoutput.html#tut-f-strings
"...but this time arround it is not working"
which is not a big surprise with MATLAB.
Accepted Answer
More Answers (0)
Categories
Find more on Get Started with MATLAB in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!