Computers and Technology
Computers and Technology, 24.03.2021 15:50, kbows12

Difficulty: Moderate Exercise 6 (4 points):
**Create a function in a file that begins with
function q-markov (P, x0)
format
n=size (P,1);
q-1);
**First, the function has to check whether the given matrix P (that will have positive entries)
is stochastic, that is, left-stochastic. If P is not left-stochastic, the program displays a message
disp('P is not a stochastic matrix')
and terminates. The empty output for a will stay.
If P is left-stochastic (then it will be regular stochastic), we will proceed with following:
**First, find the unique steady-state vector q, which is the probability vector that forms a
basis for the Null space of the matrix P-eye (n): employ a MATLAB command null(,'r')
to find a basis for the Null space and, then, scale the vector in the basis to get the required
probability vector a.
**Next, verify that the Markov chain converges to q by calculating consecutive iterations:
x =P*x0, x =P*x, x, =P*X,
You can use a “while” loop here. Your loop has to terminate when, for the first time, the
output of the function closetozeroroundoff () with p=7, run on the vector of the difference
between a consecutive iteration and q, is the zero vector. Count the number of iterations k that
is required to archive this accuracy and display k in your code with the corresponding
message.
This is the end of your function markov.
We

answer
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 18:30, Angelanova69134
Technician a says that a shop towel should never be used to clean around the flange area before replacing an automatic transmission filter. technician b says that a dimpled transmission fluid pan can be repaired. who is right
Answers: 3
image
Computers and Technology, 23.06.2019 07:30, Morganwing1019
To check spelling errors in a document, the word application uses the to determine appropriate spelling. internet built-in dictionary user-defined words other text in the document
Answers: 2
image
Computers and Technology, 23.06.2019 10:00, serenityharmon1
Hey i just logged on and one of the moderators deleted a bunch of my answers to questions, even though the answers were right and the people it doesn't make sense but if anyone wants to talk about anything just message me lol (this is super random lol)
Answers: 1
image
Computers and Technology, 23.06.2019 16:10, alexis9658
What is the ooh? a. omaha occupation handbook b. online occupational c. occupations online d. occupational outlook handbook select the best answer from the choices provided
Answers: 3