필터 지우기
필터 지우기

Use msgbox to identify string characters and input a string variable

조회 수: 5 (최근 30일)
Devante Kerr
Devante Kerr 2021년 7월 20일
댓글: Devante Kerr 2021년 7월 20일
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!

답변 (1개)

Walter Roberson
Walter Roberson 2021년 7월 20일
msgbox( sprintf('The file is now saved under "%s" within the folder titled "Matlab"', q) )

카테고리

Help CenterFile Exchange에서 Startup and Shutdown에 대해 자세히 알아보기

제품


릴리스

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by