From: Cat on
I'd really appreciate your help with a super simple problem:

I've written a piece of code to basically add the number 1 to my matrix depending on a number of silly variables. I allow my code to run for 100 time steps and then cuts off.

At each time step i record the number of 1's in the matrx:
Num_Infect_Steps(Time_Steps)=length(find(A==1));
which produces a list of numbers 100 long. Perfect.

But what i want to do is to run this simulation 100 times, basically letting the above code repeat 100 times. And i want to record the above list of numbers, the Num_Infect_Steps variable for each of the 100 repeats.

I know this is such a simple problem but i can't seem to figure it out!

Many thanks