Clear Filters
Clear Filters

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

1 view (last 30 days)
Swati
Swati on 23 Apr 2012
Commented: Jan on 24 Jan 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

Answers (1)

Jan
Jan on 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 Comments
Swati
Swati on 23 Apr 2012
Edited: Walter Roberson on 23 Jan 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 on 24 Jan 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');

Sign in to comment.

Categories

Find more on File Operations in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!