ambiguity in location of path
1 回表示 (過去 30 日間)
古いコメントを表示
Hi ,
This is so weird. Here is the code.
f2=fullfile(f1,'COScell1','Input');
f2w=fullfile(f1,'COScell1','Output-32','Segmentation_Check');
% File path for Colored folders
fg=fullfile(f2w,'Green');
fg_centroid=fullfile(fg,'GreenCentroid');
fg_centroidCorrected=fullfile(fg,'Green_CentroidCorrected');
There is another folder called Segmentation which contains similar folders. After I run the program if I type fg_centroid , this is what I get
COScell1\Output-32\Segmentation\Green\GreenCentroid ..
hence the images I write get written in the Segmentation folder and not Segmentation_Check folder. Please help me out. Thanks in advance.
3 件のコメント
Walter Roberson
2011 年 9 月 15 日
Which MATLAB version are you using?
As a cross-check I would put in a breakpoint and check each step from the fg= onward -- e.g., checking that fg did not somehow change.
Also,
which -all fullfile
on the off-chance that you have your own fullfile function.
採用された回答
Walter Roberson
2011 年 9 月 15 日
When I tested a moment ago on R2008b Linux-64, I got the Segmentation_Check folder as expected.
0 件のコメント
その他の回答 (1 件)
Fangjun Jiang
2011 年 9 月 15 日
Double-check. I got it right, assume f1='';
>> fg_centroid
fg_centroid =
COScell1\Output-32\Segmentation_Check\Green\GreenCentroid
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で File Name Construction についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!