function referencepcpath=get_fullpath(referencepcpath)
curdir=cd;
[a,b,c]=fileparts(referencepcpath);
cd(a)
referencepcpath=which([b c]);
cd(curdir)