Variable as placeholder in an "fopen" statement
显示 更早的评论
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 个评论
"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.
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Get Started with MATLAB 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!