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

Programming Notes Study Guide

by: Neha Bhagirath

Programming Notes Study Guide BE1500

Marketplace > Wayne State University > Engineering and Tech > BE1500 > Programming Notes Study Guide
Neha Bhagirath

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

This a study guide for the first midterm for BE 1500
Intro to Programming
Tonya Whitehead
Study Guide
50 ?




Popular in Intro to Programming

Popular in Engineering and Tech

This 9 page Study Guide was uploaded by Neha Bhagirath on Wednesday June 15, 2016. The Study Guide belongs to BE1500 at Wayne State University taught by Tonya Whitehead in Spring 2016. Since its upload, it has received 26 views. For similar materials see Intro to Programming in Engineering and Tech at Wayne State University.


Reviews for Programming Notes Study Guide


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: 06/15/16
Day 8  ­3 variables (2,3,4 line) and e and a are strings because e is in single quotes    ­Base ten numbers are decimal numbers  ­Binary numbers are base 10 (only 1 and 0, on or off)    ­every binary has a unique decimal value   ­how to convert from binary to decimal:    EXAM REVIEW:  ­ 4 anonymous functions and 1 vector are the inputs so there are 5 inputs  ­there are zero outputs  ­are the anonymous functions always in the command window? If it says “the anonymous  functions are going to be an input, then yes.” otherwise, it might say define them in your function  ­anything you put in the command window, it is not known by the script so you must put any  defined variables in the command window (like T=1)    Day 9­Exam review  ­know how to do anonymous functions w/ multiple variables    Question 1:    Answer:    Script:  %p is the density   %for two variables you need two defining input equations  d=input('Enter a diameter of the tank: ')  h=input('Enter a height of the tank: ')     volume=1/3*pi*(d/2)^2*h;  %replace r with d/2  %doesn't ask for an anonymous function so you do not need it  weight=volume*62.3; %consider mass as weight, d=m/v     display(volume)  display(weight)      Command Window:  >> untitled6  Enter a diameter of the tank: 4    d =         4    Enter a height of the tank: 4    h =         4      volume =       16.7552      weight =       1.0438e+03    >> format compact  >> untitled6  Enter a diameter of the tank: 4  d =       4  Enter a height of the tank: 4  h =       4  volume =     16.7552  weight =     1.0438e+03                Question 2:  Answer:  Script:  %says in the question we have one input with 5 numbers   function[sue]=untitled6(tim)  a=tim(1);  b=tim(2);  c=tim(3);  d=tim(4);  e=tim(5);  sue=(a+b+c+d+e)/5;  %other option you can do is sue=mean(tim) which is more efficient;  %other option is to do sue=(tim(1)+tim(2)+tim(3)+tim(4)+tim(5))/5;  end     Command Window:  untitled6([2 4 6 8 10])  ans =       6    Question 3:  Answer:  Script:  function [ output_args ] = untitled9( x1,y1,z1,x2,y2,z2)  %UNTITLED9 Summary of this function goes here  %   Detailed explanation goes here  d=((x2­x1)^2+(y2­y1)^2+(z2­z1)^2)^(1/2) ​ %distance calculation  i (x1~=0) && (x2~=0) && (y1~=0) && (y2~=0) && (z1~=0) && (z2~=0) ​ %the double and  is like doing a semicolon at the end and it suppresses the calculation      display'Points in 3D space'​)  elseif(x1~=0) && (x2~=0) && (y1==0) && (y2==0) && (z1==0) && (z2==0)      display'Points along the x­axis')  elseif(y1~=0) && (y2~=0) && (x1==0) && (x2==0) && (z1==0) && (z2==0)      display'Points along the y­axis')  elseif(z1~=0) && (z2~=0) && (y1==0) && (y2==0) && (x1==0) && (x2==0)      display'Points along the z­axis')  elsei​(x1==0) && (x2==0)      display'Points within y­z plan) ​ elsei​(y1==0) && (y2==0)      display'Points within x­z plan) ​ elsei​(z1==0) && (z2==0)      display'Points within x­y plan) ​ end  end​ %need two end statements for a function or switchcase with elseif      Command Window:   untitled9(1,2,3,12,13,14)    d =       19.0526    Points in 3D space  >>    


Buy Material

Are you sure you want to buy this material for

50 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!"

Amaris Trozzo George Washington University

"I made $350 in just two days after posting my first study guide."

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

Parker Thompson 500 Startups

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

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.