New User Special Price Expires in

Let's log you in.

Sign in with Facebook


Don't have a StudySoup account? Create one here!


Create a StudySoup account

Be part of our community, it's free to join!

Sign up with Facebook


Create your account
By creating an account you agree to StudySoup's terms and conditions and privacy policy

Already have a StudySoup account? Login here

Introduction to Computing Using MATLAB

by: Lacey Collier

Introduction to Computing Using MATLAB CS 1112

Marketplace > Cornell University > ComputerScienence > CS 1112 > Introduction to Computing Using MATLAB
Lacey Collier
GPA 3.84

K. Fan

Almost Ready


These notes were just uploaded, and will be ready to view shortly.

Purchase these notes here, or revisit this page.

Either way, we'll remind you when they're ready :)

Preview These Notes for FREE

Get a free preview of these Notes, just enter your email below.

Unlock Preview
Unlock Preview

Preview these materials now for free

Why put in your email? Get access to more of this material and other relevant free materials for your school

View Preview

About this Document

K. Fan
Class Notes
25 ?




Popular in Course

Popular in ComputerScienence

This 52 page Class Notes was uploaded by Lacey Collier on Saturday September 26, 2015. The Class Notes belongs to CS 1112 at Cornell University taught by K. Fan in Fall. Since its upload, it has received 24 views. For similar materials see /class/214330/cs-1112-cornell-university in ComputerScienence at Cornell University.


Reviews for Introduction to Computing Using MATLAB


Report this Material


What is Karma?


Karma is the currency of StudySoup.

You can buy or earn more Karma at anytime and redeem it for class notes, study guides, flashcards, and more!

Date Created: 09/26/15
CS 1112 In rroduc rion To Compu ring Using Ma rlab Spring 2009 Professor39s D Fan and C Van Loan httpwwwcscorneeducoursescs111220093p Today An Illuminating Problem Review The 1112 philosophy amp syllabus Discuss 1110 vs 1112 vs 1114 S rep Through cour39se logis rics An Illumina ring Problem CompuTing Square Roo rs Suppose A gt O Observa rion If you can build a square having area A Then by measuring i rs side you have M Idea Produce a sequence of increasingly square rec rangles each having area A How If a square and a r39ec rangle have The same area A Then J is in be rween The leng rh and wid rh of The r39ec rangle An Improvemen r S rm regy Currenf Recipe LneW L AL 2 Nex r AL LHCW J in 1 111M151 ij v quotr n x 11 39 J l A MaTlab Scrip r The first rectangle L1 A W1 1 0 The second rectangle L2 L1Wl2 W2 AL2 The third rectangle L3 L2W22 W3 AL3 o and so on The Progression of RecTangles WWWWWKO Length 000000000000000 000000000000000 400000000000000 023529411764706 000091554131380 000000001396984 NNNNI H Width 000000000000000 800000000000000 647058823529412 976653696498055 999908448662588 999999998603016 Some Conclusions I r paid To have a geome rr39ic sense A complica red compu ra rion was reduced To a sequence of elemen rar39y calculations A program is like a formula Le r Us Review The 1112 Philosophy amp Syllabus The 1112 Goal Develop a practical in rui rion abou r compu rer39 problem solving and i rs role in science and engineering The Vehicle is The Ma rlab Environmen r where you can easily Develop programs Display resul rs Si ideas graphically In rerac r wi rh large da ra se rs Process images and sound LeT39s Discuss The Key Words Develop a practical in39rui39rion abou r compu rer39 problem solving and i rs role in science and engineering WhaT do we mean by InTuiTionquot If in rui rion is a sense of dir39ec rion Then compu ra rional in rui rion is a sense of computational dir39ec rion A Sense of Geome rr39y Ray Tracing 100 million Triangles A Sense of Complexi ry Search Trees Billions of Choices A Sense of Probabili ry and STaTisTics Via Simula rion EEI Sweep Number u Hem Strength Sweep Number 12 He d Strength A Sense of Approxima rion Error and Noise 13 3333 Pi 227 Develop a practical in39rui39rion abou r compu rer39 problem solving and i rs role in science and engineering Mammy Venus Sun We 5m Models Ar39e Buil r En rer The CompuTer39 A Protein Build one of TheSe for39 Profeins Periodic Table 0fthe Elements 3 c N A Challenge The da ra is There Tycho has ca raloged The s rar39squot Now make sense of it Where are The genomic Kepler39squot Develop a practical in39rui39rion abou r compu rer39 problem solving and i rs role in science and engineering WhaT Goes On in Engineering En rer The CompuTer39 Develop a practical in39rui39rion abou r compu rer39 problem solving and i rs role in science and engine r39ing WhaT Do We Mean By CompuTer Problem Solvingquot The key idea Algori rhm A s repby s rep procedure Tha r Takes you from a prescribed se r of inputs To a prescribed se r of outguts The Travehng Salespersonquot Problem once Find The shor res r possible pafh Algori rhm always 90 To The nearesf unvisifed ci ry Develop a practical in39rui39rion abou r compu rer39 problem solving and i rs role in science and engineering WhaT Do We Mean By PracTicaquot I r means Tha r you carry away useful compu rer39 skills Theor39y Ms Pr39acTice Pr39ove Tha r The program con rr39olling rhis missile silo is cor39r39ec r A Theoretical exercise wi rh great practical importance Discuss 1110 vs 1112 vs 1114 651110 InTro To Compu ring using Java 651110 and CS 1112 Take you To The same problem solving skill des rino rion The vehicles are differ39en r Who r you see OUT The window is differ39en r 651114 InTro To CompuTing using MoTlob ond RoboTics An honors level in rro To CS using camera con rrolled robo rs Sony Aibo iRobo r Creo re An ol rerno rive To 651112 or 651130 To fulfill your Mo rlob compu ring requiremen r Formerly known as 651OOR 651114 InTro To CompuTing using MaTlab and RoboTics Prerequisites Exposure To programming in any language Some in reres r in ma rh Cast of Characters Sony AIBO iRobot Create Requiremen rs A r rend lec rur39e A r rend sec rion lab To comple re weekly exercise Monitor announcemen rs on websi re Wr39i re 3 pr39elims The final exam Do homework programming projec rs Take a subse r of inclass quizzes using chckers Adher39e To The Code of Academic In regr39i ry Grading Bes r 5 of six projec rs 25 Sec rionLab exercises inclass quizzes 5 We coun r The bes r x of y i rems xlty Prelim 1 10 Prelim 2 20 Prelim 3 20 Final exam 30 I Weight of worst exam reduced by 10 Course Mo reriols Cour39se pocke r 1775th Through Compufng by Von Loon Si Fan An iCIicker39 clicker MATLAB S ruden r Version R14 op rionol because you can use if in The public labs Consul ring amp CompuTing Consul ring in ACCEL Green Rm Engineering Library Check course websi re for hours Some public labs Upson B7 ACCEL in Engineering Library Carpen rer Hall Nor rh campus RPCC Clara Dickson 651112 sections Sec Time Room 201 T 1220110p UP B7 Right amp HLS 362 202 T 125215p UP B7 Right amp HLS 368 203 T 230320p UP B7 Right amp BMB B11 204 T 335425p UP B7 Right amp HLS 362 205 W 10101100a UP B7 Right amp UPS 211 206 W 1115a1205p UP B7 Right amp UPS 211 207 W 1220110p UP B7 Right amp HLS 372 208 W 125215p UP B7 Right amp HLS 372 209 W 230320p UP B7 Right amp HLS 368 210 W 335425p UP B7 Right amp PHL 407 211 W 730820p UP B7 Right amp HLS 314 212 W 835925p UP B7 Right amp HLS 314 Go to UP B7 lab this week not the classroom Academic Excellence VVorkshops Small collabor39a rive op onaclasses parallel To cour39se rhe Classes begin week of Jan 26 See cour39se websi re for39 Timeroom info WhaT To do now Pick a course 651112 or39 651110 or39 651114 Adddrop lecture and sec rion and AEW Review cour39se websi re 5 rarquotr reading see syllabus on course websi re A r rend Section in The lab Upson B7 This week Today and Wednesday Working wifh Acousfic Da ra wavrga d sound wavwrite Reading and Playing wavzead noczy wav y rate nBits sound y zate How is audio informafion encoded Reading Acousfic Da ra Discrefe vs Confinuous Sound is confinuous Capfur39e ifs essence by sampling Qualify Issue Sampling Rafe If sampling not frequent enough then the discretized sound will not eeptune the of tneeontinuous s u W Tooslow Sj a OK essence We Sampling Rafe Con r39d Given human percepfionabou1 20000 samplessecond is preH39y good ie 20000 Her39fz ie 20kHZ Sampling RaTe ConT39d 8000 Hz required for speech over The Telephone 44100 Hz required for audio CD MP3 files 192400 Hz required for HD DVD audio Tracks QualiTy Issue ResoluTion Each sampled value is encoded as an eighTbiT inTeger in The wav file Possible values 128 127101127 Loud 12090122eTc QuieT 31o5 Back To wavread yratenBits wavread noCrywav39 n lengthy n 77804 rat 11025 nBits ResoluTion wiTh 8 BiTs For each sample wavread produces one of 256 possible floaTing poinT values 256 possible values 1 k128 LeT39s Look aT The Sample Values 007031250000000 013281250000000 067968750000000 051562500000000 021875000000000 y5000050010 48437500000000 71093750000000 57031250000000 14843750000000 39062500000000 25000000000000 values in beTween 1 an 1 LeT39s PloT The DigiTized Sound yratenBits wavread noCrywav n lengthy Plot y The whole 7second soundbi re A 6 millisecond segment y 77804 y31968 32032 A 1 millisecond segment summary y31992 32008 Example 6 data rate nBits wavread noCry wav 3192 319 31556 31998 32 aznnz 32mm aznne 32m Mn Shor rcu rs Playback via sound datarate wavread noCry dataratenBits wavread noCrywav sounddatarate datarate wavread noCry Usually want playback a r a rate egan ToThe sampling rate Playback via sound datarate wavread noCry sounddatarate Note There are Other Storage Formats Besides the wav Format The wav format does not involve compression The mp3 format does involve compression It reduces storage by a factor of about 10 Three Problems 1 Making a Playlist 2 Segmentation 3 Splicing Computing with acoustic data invariably involves Computing with 1dimensional real vectors Three Problems The Sidfshows 1 Making a Playlist 2 Segmentation 3 Saving a soundbite Computing with acoustic data invariably involves Computing with 1dimensional real vectors Playlist Suppose we have a set of wav files eg Casablancawav AustinPowersWav GoneWithWindWav BackToSchoolWav and wish to play them in succession Function MakePlayList function P MakePlayListC n lengthC for k 1n ykrk wavreadCk Pk struct39data39 yk rate39 rk end Takes a cell array of wav file names and stores the information in a struct array Func rion PIayPIayLis r function PlayPlayListP for k1lengthP k th soundbitem y Pkdata rate Pkrate soundyrate L lengthY pauseLrate 2 end Plays each soundbife and adds 2 sec pause Overall Solu rion C Casablanca39m 39 s nPowers 39GonewithW1 d39 BackToSchool P MakePlayListC PlayPlayListP


Buy Material

Are you sure you want to buy this material for

25 Karma

Buy Material

BOOM! Enjoy Your Free Notes!

We've added these Notes to your profile, click here to view them now.


You're already Subscribed!

Looks like you've already subscribed to StudySoup, you won't need to purchase another subscription to get this material. To access this material simply click 'View Full Document'

Why people love StudySoup

Bentley McCaw University of Florida

"I was shooting for a perfect 4.0 GPA this semester. Having StudySoup as a study aid was critical to helping me achieve my goal...and I nailed it!"

Allison Fischer University of Alabama

"I signed up to be an Elite Notetaker with 2 of my sorority sisters this semester. We just posted our notes weekly and were each making over $600 per month. I LOVE StudySoup!"

Jim McGreen Ohio University

"Knowing I can count on the Elite Notetaker in my class allows me to focus on what the professor is saying instead of just scribbling notes the whole time and falling behind."


"Their 'Elite Notetakers' are making over $1,200/month in sales by creating high quality content that helps their classmates in a time of need."

Become an Elite Notetaker and start selling your notes online!

Refund Policy


All subscriptions to StudySoup are paid in full at the time of subscribing. To change your credit card information or to cancel your subscription, go to "Edit Settings". All credit card information will be available there. If you should decide to cancel your subscription, it will continue to be valid until the next payment period, as all payments for the current period were made in advance. For special circumstances, please email


StudySoup has more than 1 million course-specific study resources to help students study smarter. If you’re having trouble finding what you’re looking for, our customer support team can help you find what you need! Feel free to contact them here:

Recurring Subscriptions: If you have canceled your recurring subscription on the day of renewal and have not downloaded any documents, you may request a refund by submitting an email to

Satisfaction Guarantee: If you’re not satisfied with your subscription, you can contact us for further help. Contact must be made within 3 business days of your subscription purchase and your refund request will be subject for review.

Please Note: Refunds can never be provided more than 30 days after the initial purchase date regardless of your activity on the site.