Thread Subject: Problem with command "cd"

Subject: Problem with command "cd"

From: Roy

Date: 1 Dec, 2008 04:57:01

Message: 1 of 2

I have a problem with the command 'cd'.

For example: my current directory is I:\research\homework\hw1

1. command cd('\research') works.
2. command cd('\homework') does not work.

Could anybody kindly help me on this? I don't understand the logic here.

Thank you very much.

Subject: Problem with command "cd"

From: Ryan Ollos

Date: 1 Dec, 2008 05:12:02

Message: 2 of 2

"Roy" <agentof2008@gmail.com> wrote in message <ggvqqt$qvv$1@fred.mathworks.com>...
> I have a problem with the command 'cd'.
>
> For example: my current directory is I:\research\homework\hw1
>
> 1. command cd('\research') works.
> 2. command cd('\homework') does not work.
>
> Could anybody kindly help me on this? I don't understand the logic here.
>
> Thank you very much.

You can do
cd('\research')
cd('homework')

or

cd('\research\homework')

The problem you have is that '\' specified root, and homework is not relative to root.

Tags for this Thread

Everyone's Tags:

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Tag Activity for This Thread
Tag Applied By Date/Time
command Roy 1 Dec, 2008 00:00:25
cd Roy 1 Dec, 2008 00:00:25
rssFeed for this Thread

Contact us at files@mathworks.com