Code covered by the BSD License  

Highlights from
Benchmark Problem 02 - Matlab Code

image thumbnail

Benchmark Problem 02 - Matlab Code

by

 

21 May 2013 (Updated )

This is the Matlab code for the model Benchmark Problem 02.

run_mutants.m
A=dir('Mutant*.m');
MUT=zeros(length(A),2);  % This stores the pass/fail or mutant failed to run status

for tagcase = 1:6  % Run the taguchi test cases on the mutants one by one
    
for i=1length(A)
    save temp i A MUT tagcase
    clear all
    load temp 
    filesn=A(i).name;  % Firt mutant file
    try
        if ~exist(filesn)
            i=i+1;
        else
            eval(filesn(1:end-2));
            if maxerr > 3e-4
                MUT(i,1)=1;
                MUT(i,2)=maxerr;
                disp(['Max error in test ' filesn ' is ' num2str(maxerr)]);
            end
        end
        r=r+1;
        save temp r
    catch ME
                MUT(i,1)=2;
                MUT(i,2)=0;
    end
end
% save MUT_Tag6_6 MUT
save MUT_final MUT
end

Contact us