Skip to main content

Hello, 

I am working on designing lenses (Intraocular lens) of a power range and each power has unique merit function. I could manage to load merit function using the command below - 

TheMFE = TheSystem.MFE;

mf3_filename = System.String.Concat(sampleDir,'\API\Matlab\MeritFunc\10.0D MF.MF');

TheMFE.LoadMeritFunction(mf3_filename);

 

In the same location I have merit functions for different power lenses. Can anyone suggest me a way how can I successfully load power specific merit function?

Thanks in advance!

 

Regards,

Rahul

Hi Rahul,

It seems to me that you can adjust the filename of the merit function, or am I missing something? I am not that proficient with matlab, but something like this should work to loop through them:
 

TheMFE = TheSystem.MFE;


powers = 10.0, 10.5, 11.0];
for i = 1:length(values)
mf3_filename = sprintf('%s\\API\\Matlab\\MeritFunc\\%.1fD MF.MF', sampleDir, powers(i));
TheMFE.LoadMeritFunction(mf3_filename);

% ...
end

 


Reply