Couple of comments on code...
timearray = (0:.5:250);
reshape(timearray, [501,1]);
The reshape above does nothing as you didn't assign the result to anything. Matlab does NOT ever modify arguments. If you want a column vector for timearray write
timearray = (0:.5:250).';
% NB the dot-transpose operator (not complex transpose ')
function resultarray = deOxygen(array , timearray, constant)
resultarray = (((array(6,1).*array(2,1))/(constant-array(6,1))) ...
.* (exp(-array(6,1)*timearray*3600)- exp(-constant*timearray*3600))) ...
.+ (array(1,1)*exp(-constant*timearray*3600));
Don't need a loop; use the vectorized operations in Matlab. The "dot-operators" are used for element-by-element operations on arrays and vectors; aren't need to apply a constant to such (altho doesn't hurt).
As to the question posed, I'm not certain what you're after -- the output of
linspace(100,250,6)
will be a series of length 6 from 100 to 250 similarly to your above timearray variable you created with the colon operator. But what, precisely you really want to plat versus that at such a disparate set of values isn't clear to me but whatever they are, you'll need a set of six values to match.
Oh, I suppose it's possible you're looking to find the places within the computed array that matchup -- that would be
>> [~,~,ib]=intersect(linspace(100,250,6),timearray)
ib =
201 261 321 381 441 501
>>
so you could get resultarray(ib) for the computed values at those times. That doesn't seem to have anything to do with any flow velocity, however, so I'm still uncertain as to the actual question.
