how to put several parts together in a call to function using file path and file name?

조회 수: 2 (최근 30일)
This way everything seems to work because file dftregistration.m is in the current MATLAB directory
[outputGreg]=dftregistration(fft2(Frame),fft2(LightNorm),str2num(presicion{:}));
However, I am not sure how to achieve the same results using
[AlgoriphmName AlgoriphmPath]=uigetfile('*.m','Select Algoriphm used for realignment','dftregistration.m');
How to use AlgoriphmPath and AlgoriphmName in [outputGreg]= to get the same result like above?

채택된 답변

Image Analyst
Image Analyst 2013년 6월 5일
If the file specified in the AlgoriphmName string is not on the search path, you'd need to use cd before you call it:
cd(AlgoriphmPath);
eval(AlgoriphmName);
By the way, in English algorithm has no "p" in it.

추가 답변 (0개)

카테고리

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