REC12+Problems+Set

REC12+Problems+Set - 14:440:127 Introduction to Computers...

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

View Full Document Right Arrow Icon

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

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

Unformatted text preview: 14:440:127 Introduction to Computers for Engineers Recitation 12- Problems for students to attempt 1. Plotting Over the past 5 years, the number of students in some Computer Vision class has been 15, 25, 55, 115, 144. Class size seems like it ʼ s growing exponentially. To verify this, plot these values on a plot with a log y scale and label it ( semilogy, xlabel, ylabel, title ). Use magenta square symbols of marker size 10 and line width 4, and no line connecting them. (marker size and line width are both properties that you can change direction in a line of code - type in help plot to see examples.) You may have to change the x limits to see all 5 symbols ( xlim ). If the relationship really is exponential, it will look linear on a log plot. 2.Function Make function M-Fle called myLoopTest (N) that loops through the values 1 through N and for each number n it should display ʻ n is divisible by 2 ʼ , ʻ n is divisible by 3 ʼ , ʻ n is divisible by 2 AND 3 ʼ or ʻ n is NOT divisible by 2 or 3 ʼ . Use a for loop, the function mod or rem to Fgure out if a number is divisible by 2 or 3, and num2str to convert each number to a string for displaying. You can use any combination of if, else, and elseif. 3.System of Equations Solve the following system of equations. Compute and display the error vector, which is A*(your Fndings) - b. 3a + 6b + 4c = 1 a + 5b = 2 7b + 7c = 3 4.Fitting Line to Data Write a script to load the data Fle myRandData.mat (which contains variables x and y ) and Ft Frst, second, third, fourth, and Ffth degree polynomials to it. Plot the data as blue dots on a Fgure, and plot all Fve polynomial Fts using lines of different colors and increased widths. on the same axes. (line width is a property that you can change direction in a line of code - type in help plot to see examples.) Label the Fgure appropriately. To get good Fts, you ʼ ll have to use the centering and scaling version of poly¡t (the one that returns three arguments, see help ) and its counterpart in polyval (the one that accepts the centering and scaling parameters). Your script should generate the ¡gure below: 5.Plotting Make a vector of 10 random values and plot them on a bar graph using red bars, something like the Fgure below. 6.Structures Structures are useful in many situations when dealing with diverse data. ¡or example, get the contents of your current directory by typing a=dir; a. a is a structure array. What is its size? What are the names of the Felds in a ?...
View Full Document

This note was uploaded on 03/24/2011 for the course ENGINEERIN 127 taught by Professor Finch during the Spring '08 term at Rutgers.

Page1 / 7

REC12+Problems+Set - 14:440:127 Introduction to Computers...

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

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