Your heat transfer model has to be dependent upon something else to cause it to return different values; you show arguments (x,y) which one presumes are the geometry. What is the variable you want to change in these three runs; it can't be the output temperature itself, it has to be something in the model.
You need to move whatever is/are that/those parameter/s into the argument list so you can set its/their values when you call it in the loop. Then the loop could look something like
VarToChange=V0; dV=dV0; % initial values of the variable(s) and the change/increment
N=10; % the number of loops
T=zeros(n,m,N); % preallocate the output for nxm x nLoops
for i=1:N
T(:,:,i)=heat(x,y,VarToChange); % call the model with the other parameter(s)
VarToChange=VarToChange+dV; % increment the variable
end
You'll end up w/ 3D array with each plane one of the solutions for the particular VarToChange level.
You could, alternatively, use cell arrays and write the return values as
T{i} = heat(x,y,VarToChange);
and each would then be an nxm cell array.
