C- Computer Questions- Solutions and RubricExam 1

C- Computer Questions- Solutions and RubricExam 1 -...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Computer Question 1: Plot and Subplot Write Matlab code that displays the following four graphs next to each other (in one figure) as seen below. Let x contain 100 evenly spaced points, running from 0 to 10. Title and label both the x and y axes of your graph. a) y = x 2 b) y = x 3 c) y = (x- 5) 3 d) y = x x = linspace(0,10,100); subplot(2,2,1); plot(x, x.^2); title(‘x squared’); xlabel(‘x’); ylabel(‘y’); subplot(2,2,2); plot(x, x.^3); title(‘x cubed’); xlabel(‘x’); ylabel(‘y’); subplot(2,2,3); plot(x, (x-5).^3); title(‘x - 5 cubed’); xlabel(‘x’); ylabel(‘y’); subplot(2,2,4); plot(x, sqrt(x)); title(‘sqrt of x’); xlabel(‘x’); ylabel(‘y’); -4 if they have minor syntax errors (they had the computer to check answers) -6 if they are missing titles, xlabels, and/or ylabels -8 if they at least successfully use 2 of the following: subplot, plot, and linspace -10 if they at least successfully use 1 of the following: subplot, plot, and linspace
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 3

C- Computer Questions- Solutions and RubricExam 1 -...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online