Home > source > lookForVariableIndex.m

lookForVariableIndex

PURPOSE ^

This function return the index of variableToFind in vector allVariables, that exsists for construction.

SYNOPSIS ^

function [ index ] = lookForVariableIndex( variableToFind, allVariables )

DESCRIPTION ^

This function return the index of variableToFind in vector allVariables, that exsists for construction.

This function return the index of variableToFind in vector allVariables,
that exsists for construction.

Prototype: [index] = lookForVariableIndex(variableToFind, allVariables)

Input:     variableToFind - Variable to find in vector allVariables
           allVariables - Vector of all variables

Output:    index - Index of the varible VariableToFind in vector
                   allVariables

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 %This function return the index of variableToFind in vector allVariables, that exsists for construction.
0002 %
0003 %This function return the index of variableToFind in vector allVariables,
0004 %that exsists for construction.
0005 %
0006 %Prototype: [index] = lookForVariableIndex(variableToFind, allVariables)
0007 %
0008 %Input:     variableToFind - Variable to find in vector allVariables
0009 %           allVariables - Vector of all variables
0010 %
0011 %Output:    index - Index of the varible VariableToFind in vector
0012 %                   allVariables
0013 
0014 function [ index ] = lookForVariableIndex( variableToFind, allVariables )
0015 
0016 found = false;
0017 i = 1;
0018 while ~found || i <= length(allVariables)
0019    if ~isempty(strfind(allVariables{i},char(variableToFind)))
0020        found = true;
0021        index = i;
0022    end
0023    i = i + 1;
0024 end
0025 
0026 return;
0027 
0028 end

Generated on Thu 24-Sep-2009 17:17:32 by m2html © 2005