Answer:
Explanation:
Explanation:
The code for the problem is as follows:
%Defining the given matrices:
%P is the matrix showing the percentage of changes in voterbase
P = [ 0.8100 0.0800 0.1600 0.1000;
0.0900 0.8400 0.0500 0.0800;
0.0600 0.0400 0.7400 0.0400;
0.0400 0.0400 0.0500 0.7800];
%x0 is the vector representing the current voterbase
x0 = [0.5106; 0.4720; 0.0075; 0.0099];
%In MATLAB, the power(exponent) operator is defined by ^
%After 3 elections..
x3 = P^3 * x0;
disp("The voterbase after 3 elections is:");
disp(x3);
%After 6 elections..
x3 = P^6 * x0;
disp("The voterbase after 6 elections is:");
disp(x3);
%After 10 elections..
x10 = P^10 * x0;
disp("The voterbase after 10 elections is:");
disp(x10);
%After 30 elections..
x30 = P^30 * x0;
disp("The voterbase after 30 elections is:");
disp(x30);
%After 60 elections.
x60 = P^60 * x0;
disp("The voterbase after 60 elections is:");
disp(x60);
%After 100 elections.
x100 = P^100 * x0;
disp("The voterbase after 100 elections is:");
disp(x100);
The output is as well as the code in the matlab is as attached.
The output will be as follows:
The voter-base after 3 elections is therefore:
0.392565, 0.400734, 0.109855, 0.096846
The voter-base after 6 elections is therefore:
0.36168, 0.36294, 0.14176, 0.13362
The voter-base after 10 elections is therefore:
0.35405, 0.34074, 0.15342, 0.15178
The voter-base after 30 elections is therefore:
0.35463, 0.32854, 0.15697, 0.15986
The voter-base after 60 elections is therefore:
0.35465, 0.32849, 0.15698, 0.15988
The voter-base after 100 elections is therefore:
0.35465, 0.32849, 0.15698, 0.15988