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!