No BSD License  

Highlights from
INCA Matlab Auto Calibration Wizard

image thumbnail

INCA Matlab Auto Calibration Wizard

by

 

27 Sep 2007 (Updated )

This is a Matlab application which accesses the INCA API and guides users through the process of aut

createvalarray(array,level,values)
function testarray = createvalarray(array,level,values)

    %Create empty array to store results.
    testarray=[];
    
    %Find length of array to determine base case or recursive case.
    arraylength = length(array);
    
    if (arraylength>1) %Recursive Case
        %Step through values in array
        for count = 1:length(array{1})

            %Store current value to temporary storage (values is passed)
            values(level,1) = array{1}(count);
            
            %Call method on smaller portion of array
            testarray=[testarray;createvalarray(array(2:length(array)),level+1,values)];
            
        end
    elseif exist('values')==0
        testarray=array{1}';
    else %Base Case
        rownum=1;
        
        %Step through values in array
        for count = 1:length(array{1})
            
            %Copy data from values array
            for valnum = 1:length(values(:,1))
                testarray(rownum,valnum) = values(valnum,1);
            end
            
            %Copy current value into the same row of testarray
            testarray(rownum,level) = array{1}(count);
            
            %Increment counter to copy data to next row.
            rownum = rownum+1;
        end
    end
end

Contact us