Hi. im attempting to create a simple input command and tab it with \t however when i run the code the (t) still appears in the command window

 Accepted Answer

If you want to use the formatting commands, you need to include a sprintf call to implement them.
This should produce the result you want:
input(sprintf('\tWhat item did you buy? (1 item only): '),'s')

More Answers (0)

Categories

Find more on Operators and Elementary Operations in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!