필터 지우기
필터 지우기

ambiguity in location of path

조회 수: 1 (최근 30일)
Mahalakshmi
Mahalakshmi 2011년 9월 15일
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
Mahalakshmi
Mahalakshmi 2011년 9월 15일
It still doesn't work. I have no clue as to why this is happening.
fg_centroid =
Z:\Lab Users\Maha\Analysis for the paper\New Project3le\COScell1\Output-32\Segmentation\Green\GreenCentroid
>> fg_centroidCorrected
fg_centroidCorrected =
Z:\Lab Users\Maha\Analysis for the paper\New Project3le\COScell1\Output-32\Segmentation_check\Green\GreenCentroidCorrected
Walter Roberson
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
Walter Roberson 2011년 9월 15일
When I tested a moment ago on R2008b Linux-64, I got the Segmentation_Check folder as expected.

추가 답변 (1개)

Fangjun Jiang
Fangjun Jiang 2011년 9월 15일
Double-check. I got it right, assume f1='';
>> fg_centroid
fg_centroid =
COScell1\Output-32\Segmentation_Check\Green\GreenCentroid

카테고리

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by