Question
EXERCISE7(4 points) Difficulty: Moderate In this exercise, you will use the codes created in the previous exercises to find the equilibrium prices for a sample
EXERCISE7(4 points) Difficulty: Moderate In this exercise, you will use the codes created in the previous exercises to find the equilibrium prices for a sample Leontief exchange (or input-output) model. You may need to review Section 1.6 of the textbook and Module 6 lecture. We assume that economy is divided into 4 sectors and that we know how each sectors output is divided (exchanged) among the other sectors of the economy. Starting with a random 4-by-4 matrix A as an input, we will generate a consumption matrix P, whose columns are the probability vectors, and use this matrix to create the exchange table between the sectors and, after that, find the proportional equilibrium prices.
ExerCIsE7 (4 points) Difficulty: Moderate In this exercise, you will use the codes created in the previous exercises to find the equilibrium prices for a sample Leontief "exchange" (or "input-output") model. You may need to review Section 1.6 of the textbook and Module 6 lecture We assume that economy is divided into 4 sectors and that we know how each sector's output is divided (exchanged) among the other sectors of the economy. Starting with a random 4-by- 4 matrix A as an input, we will generate a "consumption" matrix P, whose columns are the probability vectors, and use this matrix to create the "exchange" table between the sectors and, after that, find the proportional equilibrium prices **Write a function in MATLAB function [C, x]economy (A) which takes a matrix A-randi(100,4,4) as an input. Next, you will create a left stochastic matrix P using a code generated in Exercise 6 of this project P-stochastic (A) This matrix is used in creating an Exchange table for our economy with the set of commands T-array2table (Q, . . . VariableNames','Sectorl', 'Sector2', "Sector3', 'Sector4','n'); disp (T,false) The last column 'n' lists the same 4 Sectors purchasing outputs. (The line disp(T, false) removes the tags when displaying the table in the diary file) Then, based on the theory, you should construct a matrix B that is used in the homogeneous equation Bx-0 for finding the equilibrium prices xl, x2, x3, x4 (here, x4 will be the free variable). You will be able to find a spanning vector for the solution set using the function C-homobasis (B) created in Exercise 5 of this project; another output has to be the solution itself in the parametric vector form to display the solution in this form, you should introduce a symbolic variable syms x4 n your code for the function economy **Type the functions economy, stochastic, homobasis in your Diary file **Input the matrix A-randi(100,4,4) **Run the function [C,x] - economy (A) **CLOSE OUT YOUR DIARY FILE ExerCIsE7 (4 points) Difficulty: Moderate In this exercise, you will use the codes created in the previous exercises to find the equilibrium prices for a sample Leontief "exchange" (or "input-output") model. You may need to review Section 1.6 of the textbook and Module 6 lecture We assume that economy is divided into 4 sectors and that we know how each sector's output is divided (exchanged) among the other sectors of the economy. Starting with a random 4-by- 4 matrix A as an input, we will generate a "consumption" matrix P, whose columns are the probability vectors, and use this matrix to create the "exchange" table between the sectors and, after that, find the proportional equilibrium prices **Write a function in MATLAB function [C, x]economy (A) which takes a matrix A-randi(100,4,4) as an input. Next, you will create a left stochastic matrix P using a code generated in Exercise 6 of this project P-stochastic (A) This matrix is used in creating an Exchange table for our economy with the set of commands T-array2table (Q, . . . VariableNames','Sectorl', 'Sector2', "Sector3', 'Sector4','n'); disp (T,false) The last column 'n' lists the same 4 Sectors purchasing outputs. (The line disp(T, false) removes the tags when displaying the table in the diary file) Then, based on the theory, you should construct a matrix B that is used in the homogeneous equation Bx-0 for finding the equilibrium prices xl, x2, x3, x4 (here, x4 will be the free variable). You will be able to find a spanning vector for the solution set using the function C-homobasis (B) created in Exercise 5 of this project; another output has to be the solution itself in the parametric vector form to display the solution in this form, you should introduce a symbolic variable syms x4 n your code for the function economy **Type the functions economy, stochastic, homobasis in your Diary file **Input the matrix A-randi(100,4,4) **Run the function [C,x] - economy (A) **CLOSE OUT YOUR DIARY FILEStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started