I have written functions that add rows and columns (separately) to a matrix. Any existing data is retained. However, when I use both these functions in another function that grows the matrix to the size given by the parameters I am having a problem. The size of the new array is correct but I am not saving the existing data and don't know how to do this. Since I am using existing functions that already copy the old data I assumed that when I called the addrow or addcol function that the data would be copied at this time- but it isn't. Do I need to copy the existing data before I call either of the other functions (if, so how?) or is there another way of doing this? I am a real beginner, so answers in english (possibly with examples) would be very much appreciated.