p = -10:10; % range of values
n = 2; % constant
for j = 1:length(p) % We find y at each, p
for t = 1:10 % time loop
y(t,j)=2*exp(-t)/(p(j)*n)
end
end
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!