problem occour in Change directory,,,how to remove it..??

1 visualizzazione (ultimi 30 giorni)
Swati
Swati il 23 Apr 2012
Commentato: Jan il 24 Gen 2016
??? Error using ==> cd
Cannot CD to D:\RNAi\matlab (Name is nonexistent or not a directory).
Error in ==> roughwfingcvlet at 52
cd D:\RNAi\matlab

Risposte (1)

Jan
Jan il 23 Apr 2012
The error message tells you, that the program tried to change into a not existing directory. Without seeing the code, it is impossible to guess the reason of this error.
  2 Commenti
Swati
Swati il 23 Apr 2012
Modificato: Walter Roberson il 23 Gen 2016
addpath D:\CurveLab-2.1.2\fdct_wrapping_matlab
addpath D:\RNAi\images
numClass = 10;
cvletpath='D:\RNAi\cvfeatures\'; % created the folder first
CDPATH = [' D:\RNAi\images\'];
%cd D:\RNAi\images
% parameters for Curvelet Transform
is_real=0;
finest =2;
nbscales =5; %ceil(log2(min(M,N)) - 3)]
nbangles_coarse =16;
fid = fopen('list.txt');
if (fid < 0 )
error('bad file name');
end
count=0;
idx = 0;
while idx < numClass % subject number
idx = idx + 1;
fprintf('Read samples from class %d\n', idx);
foldName = fgetl(fid);
tmpPath = [CDPATH foldName];
% eval(['cd ' tmpPath]);
dirList = dir('*.tif'); % for original images
file_length=length(dirList);
for j=1:file_length
imName = dirList(j).name;
if strcmp(imName, 'Thumbs.db')~=1
im = imread(imName);
C = fdct_wrapping(double(im),is_real, finest, nbscales, nbangles_coarse);
X=[];
for s=1:length(C) %6
for w=1:length(C{s})
tmp = abs(C{s}{w});
m = mean(mean(tmp));
v= std2(tmp);
X = [X m v ];
end
end
cvletname = [cvletpath ddeblank(foldName) '\' regexprep(imName, '.tif', '.mat')];
eval(['save ' cvletname ' X;'])
end
end
end
fclose('all');
cd D:\RNAi\matlab
return
This one is the req code gives at 52
Jan
Jan il 24 Gen 2016
The message ist still clear: The Folder "D:\RNAi\matlab" does not exist. So create it manually in the Windows Explorer or use mkdir.
By the way: eval is evil. Better use:
save(cvletname, 'X');

Accedi per commentare.

Tag

Community Treasure Hunt

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

Start Hunting!

Translated by