Use msgbox to identify string characters and input a string variable
5 次查看(过去 30 天)
显示 更早的评论
Basically my code is supposed to read the msgbox but I'm having problems with it identifying a variable that I need inputted. The variable is bound to change with different inputs so having the msgbox function read the string values I type as well as the code is a little difficult.
This is the code
q = (user input here)
msgbox( 'The file is now saved under q within the folder titled Matlab')
So the code usually spits out whats in the quotes rather than the value of q which woudl be whatever the user inputs. If anyone could help, it would be greatly appreciated!
0 个评论
回答(1 个)
Walter Roberson
2021-7-20
msgbox( sprintf('The file is now saved under "%s" within the folder titled "Matlab"', q) )
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Startup and Shutdown 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!