E- Computer Questions- Solutions and RubricExam 1

E- 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 Begin by setting x = 0:10:100, and y = [ 2 , 44053 , 9.7033e+008, 2.1373e+013, 4.7077e+017, 1.0369e+022, 2.2840e+026, 5.0309e+030, 1.1081e+035, 2.4408e+039, 5.3762e+043 ] (Note that you don’t have to recopy this portion of code to your blue book.) Now, write Matlab code that creates a subplot with the following four graphs, displayed next to each other: 1) standard x-y plot 2) a plot where the x axis uses a logarithmic scale 3) a plot where the y axis uses a logarithmic scale 4) a plot where both axes use logarithmic scales From these graphs, also deduce the relationship between x and y. Note that you can enter these large numbers by simply typing 5.3762e+043 or similar. x = 0:10:100; y = [2 44053 9.7033e+008, 2.1373e+013, 4.7077e+017, 1.0369e+022, 2.2840e+026, 5.0309e+030, 1.1081e+035, 2.4408e+039, 5.3762e+043]; subplot(2,2,1); plot(x,y); subplot(2,2,2); semilogx(x,y); subplot(2,2,3); semilogy(x,y); subplot(2,2,4); loglog(x,y); You learn that y is exponentially related to x, so you might have y = e x , potentially with constants added in. -4 if they have minor syntax errors (they had the computer to check answers)
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.

This note was uploaded on 02/29/2012 for the course 440 127 taught by Professor Blase during the Fall '09 term at Rutgers.

Page1 / 3

E- 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