I have a problem in cd command
for i=1:length(Arr)
cd(category{:,i});
..... etc
category is vector that contain directories names. when I try to run it, the following error comes: "Argument must contain a character vector"
What is the problem? How can I fix it?
I'm using matlab 2016 for mac thank you.

Antworten (1)

Walter Roberson
Walter Roberson am 17 Nov. 2016

0 Stimmen

Your use of
cd(category{:,i});
suggests that you are extracting a row of elements rather than a single element. A single element would be expected to look like
cd(category{1,i});
or
cd(category{i});

2 Kommentare

shahad moh
shahad moh am 17 Nov. 2016
I tried them, but still genrates same problem
Walter Roberson
Walter Roberson am 17 Nov. 2016
What is class(category{1,1}) and size(category[1,1}) ?

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Images finden Sie in Hilfe-Center und File Exchange

Gefragt:

am 17 Nov. 2016

Kommentiert:

am 17 Nov. 2016

Community Treasure Hunt

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

Start Hunting!

Translated by