Plotting matlab lab

As usual, include a comment at the top explaining the purpose of the script, your name, and the date it was created.

An inverting amplifier has a gain of A = -2. This means that the amplifier can take in any input signal and produce a corresponding output signal that is inverted and doubled. If the input signal can be modeled by the sinusoidal function Vin(t) = 3sin(t), then find the following:
The function that models the output signal, Vout(t) = A*Vin(t)
Plot Vin(t) and Vout(t) on the same graph. from t = 0 to 10. Let Vin(t) be represented by a green dotted line and Vout(t) be represented by a solid blue line. Title your graph "Input and Output Voltage of an Inverting Amplifier with Gain -2." Include a legend that identifies your lines.
Suppose you are interviewing for an internship at Instagram. For one of your interview questions, you are asked to either take or find a picture and perform some basic image processing. You will need to:
Take or find a digital image and save it to your local machine. Load the image in MATLAB/Octave by using the imread() function, ie: image = imread('pathToImage\selfie.jpg'); See the script on the Basic Image Processing page to see an example.
Create a new image called "grayImage" and store in it a version of the original image, but in gray scale (black and white). To convert, use the command grayImage = rgb2gray(image);
Create a cropped image called "croppedImage." To perform the cropping, compute 10% of the original x and y dimensions and take that amount of pixels off the left, right, top and bottom. Remember, you should not be modifying your original image, but just copy over the desired pixels to croppedImage.
Create a new image called "redRemoved" and store in it just the blue and green components of the original image.
Create a subplot with all images properly labeled that contains the original image and all of your modified image. Organize your subplots into a 2x2 grid.
Extra Credit! Find or take an image of a face. Using imshow, you can mouse over the location of the eyes and the coordinates of your mouse will be displayed on the bottom. Using a similar technique from problem D above, perform a red removal of just the eyes. Save your result in an image called "redEyeRemoval." Create a new figure with the original and red-eye-removal images in a 1x2 subplot grid, labeled appropriately.

Sample Solution