필터 지우기
필터 지우기

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

조회 수: 1 (최근 30일)
Swati
Swati 2012년 4월 23일
댓글: Jan 2016년 1월 24일
??? 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

답변 (1개)

Jan
Jan 2012년 4월 23일
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
Swati
Swati 2012년 4월 23일
편집: Walter Roberson 2016년 1월 23일
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 2016년 1월 24일
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');

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 File Operations에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by