フィルターのクリア

Unable to read file 'C:\Users\​Omer\Docum​ents\MATLA​B\Automati​c-Fracture​-Detection​-Code-1.0.​0shearletS​ystem4.mat​'. No such file or directory.

1 回表示 (過去 30 日間)
Hellow everyone!
I am running a code to detect the fractures from image, in the mide of code, it asks me to load the mat file generated by this function, the mat file is present in the folder but still giving me an error that no file exisit.
Any suggestion?
  2 件のコメント
Kevin Holly
Kevin Holly 2021 年 9 月 30 日
If you drag the file into the command window, does it provide the same file path when it loads?
Omer Iqbal
Omer Iqbal 2021 年 9 月 30 日
No, it does not give the complete path ( Please snapshot) , i have also tried to change the path as well.

サインインしてコメントする。

回答 (2 件)

Image Analyst
Image Analyst 2021 年 10 月 1 日
Run this code.
topLevelFolder = 'C:\Users\Omer\Documents\MATLAB';
filePattern = fullfile(topLevelFolder, '**\*.mat')
fileList = dir(filePattern)
% Loop over them.
numFiles = length(fileList);
for k = 1 : numFiles
thisFileName = fullfile(fileList(k).folder, fileList(k).name);
fprintf('File #%d of %d :\n "%s"\n', k, numFiles, thisFileName);
% Get size info if desired
d = dir(thisFileName);
fprintf(' It is %d bytes.\n', d.bytes);
s = load(thisFileName)
end
What do you see in the command window?
  9 件のコメント
Image Analyst
Image Analyst 2021 年 10 月 4 日
When you do
X = fftshift(fft2(ifftshift(X)));
it takes X and does operations on it and puts it back into X. So X must exist already. You must define it before you call that line.
Walter Roberson
Walter Roberson 2021 年 10 月 4 日
The error messages show that CSHRMsheardec needs to be called with at least one parameter, that it refers to as X, but that you ran the function with no parameters -- for example you might have pressed the green Run button instead of going down to the command line and invoking the function passing in values.

サインインしてコメントする。


Walter Roberson
Walter Roberson 2021 年 9 月 30 日
Do not use strcat() to create the path like that: you are missing a directory separator. Use
load( fullfile(outfolder, sheerletSystem, i + ".mat") )
  18 件のコメント
Walter Roberson
Walter Roberson 2021 年 10 月 4 日
I do not seem to find a complete posting of your code, for us to see where you define outfolder . In the previous comments, you never posted that part so we just had to assume that you had already defined it.
Omer Iqbal
Omer Iqbal 2021 年 10 月 11 日
Hi !
Thanks for helping me ! I managed to run the functions. The X was supposed to estimate using some other linked functions.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeMATLAB Report Generator についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by