### Create a StudySoup account

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

Already have a StudySoup account? Login here

# Introduction to Computing for Engineers CSE 1010

UCONN

GPA 3.73

### View Full Document

## 15

## 0

## Popular in Course

## Popular in Engineering Computer Science

This 9 page Study Guide was uploaded by Americo Huel on Thursday September 17, 2015. The Study Guide belongs to CSE 1010 at University of Connecticut taught by Rehab Kharboutly in Fall. Since its upload, it has received 15 views. For similar materials see /class/205931/cse-1010-university-of-connecticut in Engineering Computer Science at University of Connecticut.

## Reviews for Introduction to Computing for Engineers

### 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/17/15

STUDY GUIDE FOR CSE 1010 FINAL EXAM FALL 2009 Review 0 Draw a owchart of the steps to solve a given problem or illustrate an algorithm using symbols appropriately Example Given the baseball statistics for a collection of players nd the batting champions for the year must have more than 1 00 plate appearances per year Assume the input data is an XlS le containing the names plate appearances and batting averages Read data from xls file in an input cell array for every row of the input cell array get player name get player AB get player plateapp create a player struct add struct to players struct array for every player in players sturct array plateapp gt 100 add player to Result Display Result Describe the meaning or purpose of each element in a function de nition line function header key word function output parameter list function name input parameter list Write a function definition line function header to specifications selecting or determining the appropriate function name input parameters and output parameters Give the file name for the resulting mf11e when the function is stored in MATLAB Write the MATLAB commands to implement a complete function according to specifications If the function specification says given that means input parameters If the function spec says return that means output parameters Write MATLAB commands a script segment to use builtin and programmerdefined function properly Design a function to accomplish a given purpose or task Strings are sequences of characters delimited by single quotes 0 They are stored as vectors onedimensional arrays of characters one character per element If you try to do arithmetic with a string variable MATLAB automatically casts the characters into doubles containing the ASCII code value for the character You can replace a substring within a string using an index and you can combine more than one string using list concatenation gtgt s abcde gtgt s24 XYZ gtgt firstname DD gtgt lastname Dog gtgt name firstname lastname Functions you should know how to use what they do how they work include char int2str num2str ischar isspace disp fprintf input strcmp Cell arrays are heterogeneous collections of elements meaning the elements may be of different data types They have the general form of arrays RECTANGULAR and can be indexed numerically Each element should be considered as a container that is either empty holds nothing or holds data of some particular type Parentheses around index values refer to the container curly braces around index values refer to the contents You should know how to create assign values access and manipulate containers and contents You should know how to concatenate cell arrays together You should know what container displays look like ie when the contents are shown inside brackets or single quotes and when the brackets surround information ABOUT the contents instead 0 Example student Biff 77 83 75 B student Biff 1x3 double B gtgtstudent 1 ans Biff returns container gtgt student 2 ans 1x3 double student 1 ans Biff returns the contents of container student 2 gt V gt V ans 77 83 75 Structures are heterogeneous collections of elements that are indexed by eld names rather than numerically 0 You should know how to create using the dot operator and the struct constructor function access and manipulate structure elements Structure arrays are collections of structures where each structure must have exactly the same elds in the same order 0 You should know how to create access and manipulate structure arrays and how to add elds and delete elds rmfield function from structure arrays Example student struct name John Smith id 123 45 6789 email smithjmyschooledu tests 6775841 newList rmfieldstudent email File inputoutput is considered to be the serialsequential transfer of a stream of characters with delimiters separating tokens o Workspace variables can be saved and retrieved with the save and load commands the lenames used should have an extension of mat Highlevel le IO commands you should know how to use csvread csvwrite xlsread xlswrite Lowlevel le IO commands you should know how to use fopen fprintf fclose feof remember you need to give fprintf the le identi er when you write to the le Solving simple problems involves 6 basic steps some of which may be repeated Solving more complex problems generally means breaking the problem down into smaller and smaller subproblems until you get to something which you know how to do or to one of these fundamental operations insert traverse build map lter fold search sort 0 An algorithm is a set of these operations performed in some order The problem solution is formed by combining the results of these operations as subproblem solutions either in sequence rst do A then do B then do C or in nested fashion for each value of A do B and C 0 You should be able to distinguish each of the operations and draw its owchart TV 139 39 39 line plotting functions vou should know how to use plot title xlabel ylabel legend hold grid subplot o How to plot multiple curves in the same plot 0 When to use lines when to use markers and when to use both You should be able to explain what curve tting is and know how to interpret the output parameters of polyfit and polyval You should be able to write the output polynomial equation as a result of executing polyfit Threedimensional plotting functions you should know how to use plot3 zlabel meshgrid mesh STUDY GUIDE FOR CSE 1010 IN CLASS EXAM 2 Review Describe the three types of execution ow and give examples of each sequential selection conditional repetition iteration Draw a owchart of the steps to solve a given problem or illustrate an algorithm using symbols appropriately Establish demonstrate appropriate loop control FOREND Loop control variable is assigned a vector of values Loop body repeats once with each element value from the vector Loop control variable retains its last value on completion of the loop WHILEEND Conditional expression must contain at least one variable ALL variables in the conditional expression must have assigned values when the rst test is made At least one variable in the conditional expressions must have its value changed within the loop body You must be able to o Create loop control vectors and conditional expressions 0 Trace values of variables through loop execution 0 State how to stopkill an inde nite in nite loop 0 State at least one way to avoid inde nite in nite loops 0 List the 5 design steps for loops 0 Determine what steps will be repeated 0 Figure out the sta1ting point 0 Figure out the stopping point 0 Make progress through the body of the loop 0 Ensure the loop will actually stop Rewrite a given forend loop as a whileend loop Rewrite a simple nested ifend statement as a set of compound nonnested ifend statements Trace values of variables through nested loops Write nested loops to speci cation Describe the meaning or purpose of each element in a function de nition line function header key word function output parameter list function name input parameter list The purpose of the comments immediately following the function definition line are to be displayed when a user types help and the function name at the command prompt Write a function definition line function header to specifications selecting or determining the appropriate function name input parameters and output parameters Give the file name for the resulting mfile when the function is stored in MATLAB Write the MATLAB commands to implement a complete function according to specifications Write MATLAB commands a script segment to use builtin and programmerdefined function properly Design a function to accomplish a given purpose or task Strings are sequences of characters delimited by single quotes They are stored as vectors one dimensional arrays of characters one character per element If you try to do arithmetic with a string variable MATLAB automatically casts the characters into doubles containing the ASCII code value for the character Functions you should know how to use what they do how they work include char double uint8 int2str num2str ischar isspace disp fprintf input strcmp Practice 1 Write a for loop that display the values taken by the index between 0 7 with an increment of 2 Show the tracing along with the output of the following loop Your answer should include the values of each of the variables in each iteration For X 027 Fprintf X f n X end 2 Write a Matlab script that will display Matlab is great only if a certain variable takes the values 10 20 30 40 50 X input 39Please enter a value for X 39 ifX10HX20HX3OHX4OHXSO disp 39Matlab is great 39 en 3 Write the header and de nition for the function countSpaces which accepts a string input and returns the number of spaces in that string Function numspaces countSpacesinstr Numspaces 0 For X instr If X Numspaces numspaces l 4 Write the header and de nition for the function countLetters which accepts a string input and returns the number of alphabetic letters in that string Hint Use Matlab s function isletter which takes a character and returns 1 if the character is an alphabetic letter and 0 otherwise Function numletters countLettersinstr Numspaces 0 For X instr If isletterX Numletters numletters l 5 What is the output of the following program trace it your self and check your answer by typing it on Matlab for k59 fprintf n for k d k f or j 2 k if remkj fprintf d j end end 6 What is the output of the following program trace it on paper then check you answer by running it in Matlab X3 while X lt 7 fprintf d x2 x x1 end

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

#### "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."

#### "When you're taking detailed notes and trying to help everyone else out in the class, it really helps you learn and understand the material...plus I made $280 on my first study guide!"

#### "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."

#### "It's a great way for students to improve their educational experience and it seemed like a product that everybody wants, so all the people participating are winning."

### Refund Policy

#### STUDYSOUP CANCELLATION 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 support@studysoup.com

#### STUDYSOUP REFUND POLICY

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: support@studysoup.com

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 support@studysoup.com

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.