MATLAB
2. Each section of this problem builds upon the previous
section. Please keep this in mind as you are answering. If you do
not answer one section correctly, you can begin the next section
assuming you have the correct answer.
a. Write code that will create the variables, x and y. x and y are
arrays. x should be an array with the numbers 0 to 100, with 200
elements. y should be the numbers -10 to 10, counting by 0.1.
b. Write code that will create a matrix z. It should be length(y)
by length(x) in size. z should implement the following
multivariable mathematical function: ?=2?+?
c. Write code that will display z as an image.
Code:
clc
clear
x = linspace(0, 100, 200);
y = -10:0.1:9.9;
z = zeros(length(y), length(x));
z = 2.*x + y;
image(z)
Output:

MATLAB 2. Each section of this problem builds upon the previous section. Please keep this in...