Background
I have a variable called bridgeRoot defined as such:
/over/the/river/and/through/the/woods
This directory has the following subdirectories:
/logs
/txt
/bins
In matlab command line, when I type bridgeRoot I get the value of the variable appropriately:
>> bridgeRoot
bridgeRoot =
/over/the/river/and/through/the/woods
However, when I try to cd to a subdirectory, I get the following error
>> command = 'cd bridgeRoot/logs'
>> system(command)
Error bridgeRoot/logs: No such file or directory
status = 1
This works when done as part of a matlab script, but for some reason it fails while in command line.
Question
How do I properly refernce matlab variables when invoking a unix command in matlab command line?