**Create a function in a file that begins with
![subject](/tpl/images/cats/informatica.png)
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
![ansver](/tpl/images/cats/User.png)
Answers: 3
![](/tpl/images/ask_question.png)
![](/tpl/images/ask_question_mob.png)
Another question on Computers and Technology
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 23.06.2019 14:30
The basic work area of the computer is it screen that you when you first fire up your computer
Answers: 1
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 23.06.2019 17:30
Per the municipal solid waste report, what are the most common sources of waste (trash
Answers: 3
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 23.06.2019 19:30
You can apply several different worksheet themes from which tab?
Answers: 1
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 23.06.2019 21:30
Which of the following includes the three primary network access technologies? dsl, cable modem, broadband lan, wan, man voip, uc, iptv tcp/ip, ftp, dhcp
Answers: 2
You know the right answer?
Difficulty: Moderate
Exercise 6 (4 points):
**Create a function in a file that begins with
**Create a function in a file that begins with
Questions
![question](/tpl/images/cats/himiya.png)
![question](/tpl/images/cats/mat.png)
Mathematics, 02.04.2020 23:58
![question](/tpl/images/cats/health.png)
![question](/tpl/images/cats/biologiya.png)
![question](/tpl/images/cats/mat.png)
Mathematics, 02.04.2020 23:58
![question](/tpl/images/cats/istoriya.png)
![question](/tpl/images/cats/en.png)
English, 02.04.2020 23:58
![question](/tpl/images/cats/obshestvoznanie.png)
![question](/tpl/images/cats/fizika.png)
![question](/tpl/images/cats/himiya.png)
![question](/tpl/images/cats/biologiya.png)
![question](/tpl/images/cats/es.png)
![question](/tpl/images/cats/en.png)
English, 02.04.2020 23:58
![question](/tpl/images/cats/biologiya.png)
![question](/tpl/images/cats/mat.png)
![question](/tpl/images/cats/biologiya.png)
Biology, 02.04.2020 23:58
![question](/tpl/images/cats/en.png)
![question](/tpl/images/cats/es.png)
Spanish, 02.04.2020 23:58
![question](/tpl/images/cats/himiya.png)