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