I have a function that will be looped through as the functions call each other i.e. function1->function2->function3->function1 etc.
In one of these functions I want to create a matrix that will store a variable for comparison, however this matrix should be retained during all cycles of the program therefore I only want to create this matrix once.
See pseudocode below for what I want to achieve.
if(exist matrix == false)%create matrix
else%do nothing
The use of this is to store an improvement value for splitting a data set. See below:
if(improvementValue > improvementStorage(1,1)) improvementStorage(1,1)= improvementValue;end
(improvementStorage being the matrix I want to create on the first iteration only.)
Any help on how to create this matrix once and not overwriting it with each program iteration would be appreciated.
Best Answer