Use MATLAB to program such that each of the initials of your name will come up in the
corners of the triangle you draw.
function studyteam_logo(corner_x, corner_y, scale_x, scale_y )
tudyteam_logo plots a logo for the programming study team.
%
% Parameter
%
% Programmed by Joel Ahearne-Ray
% This section initialize the program and get input values for the simulation.
% You don't want to change anything in this code section.
clear
clc
L = input('Length of pendulum rod (meters)? ');
thetad = input('Starting
% inclass5.m implements the main program.
%
% Programmed by: Joel Ahearne-Ray
%
% This script will get the parameters needed for a superellipse, and the
% number of points that need to be plotted. It will then plot the first
% quadrant. It will also plot
CSCI-1190 Fall 2016 Homework 1
Name:
This homework is due before the next class. Please show your work for each question in this
word document. You want to practice in MATLAB. When you finish, please submit the file to
the LMS by clicking the HW_1 link to
% Homework 3
% IDENTIFICATION
% Name:
Joel Ahearne-Ray
% Section :
% Please submit your completed HW_3.m and the functions calc.m and calc_switch.m
to the LMS.
% Q1 (60%)
% Follow the steps below to complete this question.
%
% Step 1: (40%)
% Create a fun
% in_class_2 gets the zeros of a cubic and plots it.
%
% Programmed by R. Lindsay Todd
% Clear everything.
clear
clc
% Get the zeros
p = input('Enter the first zero: '); % 4
q = input('Enter the second zero: '); % 7
r = input('Enter the third zero: '); %
%
%
%
%
%
%
%
%
inclass1a.m: In-class 1 script
This is a simple script to help familiarize us with Matlab.
When working, this program will prompt for a radius. It will then plot
a circle using the specified radius and inscribe a triangle.
% Clear the work
%Project2_main.m
%
%Used to complete Group Project Part 2
%Programmed by: Joel Ahearne-Ray
clear;
clc
% The following values obtain inputed user data
y0 = input('Please enter the initial height of the projectile (m): ');
v0 = input('Please enter the initi
Joel Ahearne-Ray
% inclass1c.m: In-class 1 script
%
% This is a simple script to help familiarize us with Matlab.
%
% When working, this program will prompt for a radius. It will then plot
% a circle using the specified radius and inscribe a triangle.
%
%
Microquiz 01
a)
b)
c)
List 3 statistics used to
summarize the typical
level of a variable.
List 3 statistics used to
summarize variability.
Consider these data.
Determine the median and
the range.
3.7, 5.9, 6.0, 11.4, 12.1,12.6, 28.5
Solution
a)
b)
c)
mea
Microquiz 08
2
a) X ~ N(300,25 ).
Compute P(X < 333).
b) The time between
support calls is
exponential with mean
= 28 minutes. What is
the probability of no
calls in an hour?
Solution
2
a) X ~ N(300,25 ).
Compute P(X < 333).
Cumulative Distribution Functi
Microquiz 09
a) W is the sum of 5
Poisson RV's. Name the
distribution of W.
b) X is the sum of 3
Normal RV's. Name the
distribution of X.
c) Y is the smallest of 3
exponential RV's. Name
the distribution of Y.
Solution
a) Poisson
b) Normal
c) Exponential
Microquiz 10
Here is the observed joint distribution
of daily demand for 2 spare parts,
"RING" and " PACKING":
Rows=RING
Columns=PACKING
01
2 All
0
71
4
12
1
44
4
12
2
30
2
5
All
14 5 10
29
Cell Contents:
Count
a) Report the marginal distribution for
"Rin
Microquiz 02
a) Your system has 3
subsytems, with 2, 5, and 4
choices of vendors,
respectively. How many total
vendor choices are there?
b) P(A)=0.6 and P(B)=0.2.
What more information do
you need to compute P(A or B)
?
c) What are the possible values
of
% The function has the regular parameters theta, a, b, m.
% The function returns the regular parameters x_tangent and ytangent.
function [x_tangent, y_tangent] = tangent_on_se(theta, a, b, m, n)
% step 1:
% Define the symbolic symbols for the parametric e
Joel Ahearne-Ray
% in_class_2 gets the zeros of a cubic and plots it.
%
% Programmed by R. Lindsay Todd
% Clear everything.
clear
clc
% Get the zeros
p = input('Enter the first zero: ');
q = input('Enter the second zero: ');
r = input('Enter the third zer
% homework2.m
%
% Homework assignment 2
% CSCI-1190 Beginning Programming for Engineers
% Fall 2014
%
% This program computes the trajectory of a projectile over Mars taking
% atmospheric drag into consideration, using Euler's method to approximately solv
% inclass6.m implements the main program.
%
% This script will get the parameters needed for a superellipse, and the
% number of points that need to be plotted. It will then plot the rst
% quadrant. It will also plot the tangent vectors at each of the poi
Matlab Programming Notes
MATLAB is a specific program that is optimized for engineering and science
MATLAB programming language is unique to MATLAB
Command Window
o
o
If a statement is too long, use an ellipsis () to continue it on the next line
o
User wi
Beginning Programming for Engineers
Quiz 1
Name:
Do both sides of this quiz!
1. (10 points) The Robotic Brain Surgeons group uses sophisticated computer programs to guide
robotic devices to do brain surgery. Recently patients have been dying
Beginning Programming for Engineers
Quiz 3
Name:
Do both sides of this quiz!
1. (15 points) What will the following program print? If you believe it will not print
anything, say no output.
1 k = 20
2 if k <
Beginning Programming for Engineers
Quiz 2
Name:
Do both sides of this quiz!
1. (a) (5 points) Write a single Matlab statement to create a row vector, Z, that contains all the
even numbers from 10 to 100, in order.
Z = [10:2:100]
(b) (
Beginning Programming for Engineers
Quiz 4
Name:
Do both sides of this quiz!
1. (10 points) In your Matlab workspace, you have several matrices pressure,
temperature, and swallow_airspeed that contain results of calculations that teammates
function [rho] = atmosphere_density(p0, t0, L, M, g, z)
% ATMOSPHERE_DENSITY computes the density of the atmosphere at
% a given height.
%
% Parameters:
%
P0 = Ground standard pressure (Earth: 101325, Mars: 600Pa)
%
T0 = Ground temperature (Earth: 288.15K
% Homework 2
% Your Name: Joel Ahearne-Ray
% Semester: Fall 2016
% How to complete this homework:
%
% 1. Each question is given in a script cell.
%
A cell portion is marked by a "%" sign.
%
You should answer each question in the corresponding cell.
%
% 2.
% CSCI_ 1190 Quiz_ 3 for Fall 2016, Session 03
% Your Name:
Joel Ahearne-Ray
% Q1(3%) Write a command to create a 5 x 1 array with any values you choose.
% Place your answer here:
A=[5 4 3 2 1]
% Q2(4%)
% Greate an array Y as shown below using A, B, and C
% Homework 5
% Name: Joel Ahearne-Ray
% Semester: Spring 2016
%
% Question 1
% An ODE equation dy/dt = t*y^2 has an initial value y(-2) = 1
% Apply the solver ode45 to calculate the numerical solution of the above ODE
% over the interval [-2, 2].
% You ar
% Name: Daniel Corridan
% Semester: Fall 2016
%
% Question 1 (10%)
% Write a for loop to display the following values to the command window:
% You can use fprintf to output. Example: fprintf('value of a: %i\n', a);
%
% value of a: 11
% value of a: 12
% va
% project1spd.m
%
% Project Part 1
% CSCI-1190 Beginning Programming for Engineers
%
% This program displays a red dashed triangle with magenta squares at its
% vertices, with my siblings' initials (S, P, and D) near vertices. The entire
picture is
% in a