A- Computer QuestionsExam 1

A- Computer QuestionsExam 1 - Computer Question 1: Plot and...

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 You are given the following points, which are given as (x,y) coordinate pairs, with the y points in scientific notation (4e+010 means 4*10^10): (20, 1.2e+009) (25, 1.8e+011) (30, 2.7e+013) (35, 4.0e+015 (40, 5.9e+017) Write Matlab code that displays the following two graphs next to each other (using the subplot function): a) A standard x-y plot of the points b) A plot of the points where the y axis is logarithmic Title the graphs (“X-Y Plot” and “Y Logarithmic”). Also answer, in one sentence, what you learn about the relationship between x and y as a result of these plots, and suggest a possible equation for y. Computer Question 2: Leap Year Write Matlab code that does the following: Ask the user to input the year. First, verify that they have entered a number that is 1) positive and 2) an integer (you can assume they’ve entered a number, and not a character string). If they have not, display an error message.
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 / 2

A- Computer QuestionsExam 1 - Computer Question 1: Plot and...

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