string variable and command prompt
10 views (last 30 days)
I know you can use a string variable with cd such as dir = 'C:Users\User\Documents\Matlab' then cd(dir). Is that same type of command possible using the system command such as [status] = system('move dir\file.txt newlocation')
Philip Borghesani on 20 Jun 2018
Short answer: yes.
Long answer: Any MATLAB function that takes one or more character vectors as input can be called in command mode see command-vs-function documentation for more information.
I am a bit surprised you had to ask is something not working the way you expect it to?