Graphics Programs Reference
In-Depth Information
Mˆ10*X0
ans =
[ x0+1023/2048*y0]
[ 1/1024*y0]
[ 1023/2048*y0+z0]
(g)
If you use the suggested alternate model, then only the first three
columns of the table are relevant, the transition matrix M becomes M =
[1 1 / 20;01 / 2 1; 0 0 0], and we leave it to you to compute that the
eventual population distribution is [1; 0; 0], independent of the initial
population.
Practice Set C
Problem 1
(a)
radiation = inline(vectorize('10000/(4*pi*((x - x0)ˆ2 + (y -
y0)ˆ2 + 1))'), 'x', 'y', 'x0', 'y0')
radiation =
Inline function:
radiation(x,y,x0,y0) = 10000./(4.*pi.*((x-x0).^2 + (y-
y0).^2 + 1))
x = zeros(1, 5); y = zeros(1, 5);
for j = 1:5
x(j) = 50*rand;
y(j) = 50*rand;
end
[X, Y] = meshgrid(0:0.1:50, 0:0.1:50);
contourf(X, Y, radiation(X, Y, x(1), y(1)) + radiation(X, Y,
x(2), y(2)) + radiation(X, Y, x(3), y(3)) + radiation(X, Y,
x(4), y(4)) + radiation(X, Y, x(5), y(5)), 20);
colormap('gray')
 
Search WWH ::




Custom Search