Add lab 1 and lab 2 (full submission)

This commit is contained in:
Blizzard Finnegan 2022-01-21 11:44:12 -05:00
parent 0ada532efe
commit 05ea2ec9f7
36 changed files with 16156 additions and 0 deletions

BIN
week1/Lab1_Procedure.mlx Normal file

Binary file not shown.

View file

@ -0,0 +1,881 @@
% This LaTeX was auto-generated from MATLAB code.
% To make changes, update the MATLAB code and export to LaTeX again.
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage{graphicx}
\usepackage{color}
\usepackage{hyperref}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{epstopdf}
\usepackage[table]{xcolor}
\usepackage{matlab}
\sloppy
\epstopdfsetup{outdir=./}
\graphicspath{ {./Lab1_Procedure_images/} }
\begin{document}
\matlabtitle{EEET425 Lab 1 Exploring Signals using MATLAB Live Editor}
\vspace{1em}
\matlabheadingthree{Lab Section \_\_\_\_\_01\_\_\_\_\_\_\_}
\matlabheadingthree{Team Members}
\matlabheadingthree{\_\_\_\_Eileen Figueroa\_\_\_\_\_\_\_\_}
\matlabheadingthree{\_\_\_\_Hale Knox\_\_\_\_\_\_\_\_\_\_}
\matlabheadingthree{\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_}
\matlabheadingthree{Team Leader}
\matlabheadingthree{\_\_\_\_Blizzard MacDougall\_\_\_\_\_\_}
\vspace{1em}
\vspace{1em}
\begin{par}
\begin{flushleft}
\underline{\textbf{How to Succeed With This Lab}}
\end{flushleft}
\end{par}
\begin{par}
\begin{flushleft}
Before executing the procedure, skim-read through the whole lab handout.
\end{flushleft}
\end{par}
\begin{par}
\begin{flushleft}
Answer the questions asked in the procedure in the text portion of this file.
\end{flushleft}
\end{par}
\begin{par}
\begin{flushleft}
Work together as a team with your lab partners to solve problems and overcome any snags. Choose a team leader for this lab. The team leader is responsible for delegating tasks, the final report submission and submitting a work breakdown report (who did what) in PDF format.
\end{flushleft}
\end{par}
\begin{par}
\begin{flushleft}
You will hand in your completed MATLAB Live Script file \underline{and} a PDF version of the same file. The PDF version makes it possible for me to comment on your work. You will also hand in the work breakdown report.
\end{flushleft}
\end{par}
\vspace{1em}
\begin{par}
\begin{flushleft}
Make sure that you have copied the data file 'Lab1\_Signal\_Data.mat' into the current working directory. The current working directory is the file where you started this Live Script from.
\end{flushleft}
\end{par}
\vspace{1em}
\begin{par}
\begin{flushleft}
\underline{\textbf{Objectives}}
\end{flushleft}
\end{par}
\begin{enumerate}
\setlength{\itemsep}{-1ex}
\item{\begin{flushleft} Understand the concept of linear drift of a signal \end{flushleft}}
\item{\begin{flushleft} Become familiar with using MATLAB to estimate the linear regression parameters of a signal on a chart \end{flushleft}}
\item{\begin{flushleft} Become familiar with manipulating signals using MATLAB and its built-in functions \end{flushleft}}
\item{\begin{flushleft} Use MATLAB to remove the linear drift component of a signal using linear regression \end{flushleft}}
\item{\begin{flushleft} Use MATLAB to separate the signal and the noise components of a signal \end{flushleft}}
\item{\begin{flushleft} Estimate the signal power and the noise power then compute the signal to noise ratio. \end{flushleft}}
\end{enumerate}
\begin{par}
\begin{flushleft}
\underline{\textbf{Lab Procedure}}
\end{flushleft}
\end{par}
\vspace{1em}
\matlabheadingthree{\underline{\textbf{Part 1}}}
\vspace{1em}
\begin{par}
\begin{flushleft}
Follow the steps in the document and in the code. I loaded the variable and plotted the first graph for you. To plot graphs later in the lab use the commands that I used as a template. Copy and Paste is your friend.
\end{flushleft}
\end{par}
\begin{matlabcode}
% Its a good idea to clear all the variables from the workspace before
% beginning with the MATLAB command <clear>
clear
% Read in the file from the current directory. Make sure that the
% directory you are in is the directory that contains the Lab 1 data file.
% <pwd> gets the current working directory
pname = pwd;
fname = 'Lab1_Signal_Data.mat';
% Load in the .mat file containing data for Lab1
% The data was stored as two variables and will be written into the workspace as those two variables
%
% sample -- The sample number
% signal -- The value of the signal
load(fullfile(pname, fname))
%
% Plot the signal value versus the sample. Use this part of the code as a
% template to copy when making graphs for the rest of the lab.
%
% !!!!!! Start copying here !!!!!!
figure % Create a new figure
plot(sample, signal) % Plot the variable signal versus sample
% Turn on the grid
grid on
% Title the graph -- Use Descriptive titles
title('Signal with Noise versus Sample')
% Label the X-axis -- Use Descriptive labels
xlabel('Sample')
% Label the Y-axis
ylabel('Signal')
\end{matlabcode}
\begin{center}
\includegraphics[width=\maxwidth{56.196688409433015em}]{figure_0.eps}
\end{center}
\begin{matlabcode}
% !!!!! Stop copying here !!!!!
\end{matlabcode}
\begin{par}
\begin{flushleft}
Press the Button below to Run your code in this section
\end{flushleft}
\end{par}
\begin{matlabcode}
\end{matlabcode}
\matlabheading{Questions:}
\begin{par}
\begin{flushleft}
What do you observe about the signal above? Does it look familiar? What is different about it?
\end{flushleft}
\end{par}
\begin{par}
\begin{flushleft}
It looks like a noisy sine wave mapped onto a linear function.
\end{flushleft}
\end{par}
\vspace{1em}
\matlabheadingtwo{\underline{Comments}}
\begin{par}
\begin{flushleft}
The signal looks like it \underline{might} be sinusoidal, but has some noise on it (the "fuzz" around the signal) and it also has some slow time variation to it as its value is sloping upwards over time. This continuous change in the signal is referred to as "drift". Drift can be caused by a number of effects, temperature and power supply voltage changes are just two examples.
\end{flushleft}
\end{par}
\begin{par}
\begin{flushleft}
The drift is not part of the signal that we are interested in looking at. In fact it is a disturbance and part of the noise on the signal. Because the amount of drift appears to be fairly consistent we can estimate the amount of drift and then actually remove the drift. The drift in the signal looks to be linear that is the signal is changing at a constant rate over time.
\end{flushleft}
\end{par}
\matlabheading{Part 2 -- Using Linear Regression to Estimate the Drift}
\vspace{1em}
\matlabheadingtwo{Step 1}
\begin{par}
\begin{flushleft}
Let's use a technique called linear regression to estimate the amount of drift and then remove it from the signal. You may have seen linear regression in your statistics class. Linear regression fits the best straight line to the data.
\end{flushleft}
\end{par}
\begin{par}
\begin{flushleft}
MATLAB has some built in functions that can be used to compute the best fit line to the data. It can fit a polynomial of any degree. We'll just fit a straight line or a polynomial of degree one.
\end{flushleft}
\end{par}
\begin{par}
\begin{flushleft}
The MATLAB command for fitting a polynomial is polyfit. The syntax for polyfit is:
\end{flushleft}
\end{par}
\begin{par}
\begin{flushleft}
coefficients = polyfit(X,Y,N) where Y is the data we are fitting to the variable X. N is the order of the polynomial. Linear -- N=1, Quadratic -- N=2 etc..
\end{flushleft}
\end{par}
\begin{par}
\begin{flushleft}
To get help on the polyfit command (or any MATLAB command) just type
\end{flushleft}
\end{par}
\begin{par}
\begin{flushleft}
\textgreater{}\textgreater{} help \textless{}command\textgreater{}
\end{flushleft}
\end{par}
\begin{par}
\begin{flushleft}
at the command window prompt. For this command \underline{especially note how the coefficients are returned.}
\end{flushleft}
\end{par}
\begin{par}
\begin{flushleft}
For a linear fit, the return variable 'coefficients' is actually a 2-dimensional array with the first element being the slope and the second variable being the intercept.
\end{flushleft}
\end{par}
\begin{par}
\begin{flushleft}
That is:
\end{flushleft}
\end{par}
\begin{par}
\begin{flushleft}
slope = coefficients( 1 )
\end{flushleft}
\end{par}
\begin{par}
\begin{flushleft}
intercept = coefficients( 2 )
\end{flushleft}
\end{par}
\vspace{1em}
\begin{par}
\begin{flushleft}
Write code below to use the polyfit command to find the best fit line to the drift
\end{flushleft}
\end{par}
\begin{matlabcode}
% Use the polyfit command to find the best fit line to the drift
%
% coefficients = polyfit( sample, signal, 1 );
% slope =
% intercept =
% Solution -- Place your code here
coefficients = polyfit(sample, signal, 1);
slope = coefficients(1);
intercept = coefficients(2);
\end{matlabcode}
\begin{par}
\begin{flushleft}
Press the Button below to Run your code in this section
\end{flushleft}
\end{par}
\begin{matlabcode}
\end{matlabcode}
\vspace{1em}
\matlabheadingtwo{Step 2}
\begin{par}
\begin{flushleft}
Create a variable that is the estimate of the drift from the slope and intercept values of the fitted line. Recall that the general equation for a line is $y=\textrm{mx}+b$ where m is the slope and b is the intercept. Create a variable in matlab called \textless{}driftEstimate\textgreater{} that represents the y-values of the line. Use the slope, the sample and the intercept as a part of the equation. The slope and intercept of the line are the values you computed above using polyfit.
\end{flushleft}
\end{par}
\begin{matlabcode}
% Place the equation to estimate the drift here
%
% Just like computing the output of the line y = slope * x + intercept
% driftEstimate = ...
%
% Solution -- Place your code here
driftEstimate = slope * sample + intercept;
\end{matlabcode}
\begin{par}
\begin{flushleft}
Press the Button below to Run your code in this section
\end{flushleft}
\end{par}
\begin{matlabcode}
\end{matlabcode}
\matlabheadingtwo{Step 3}
\begin{par}
\begin{flushleft}
Plot the signal and the fitted line on the same graph
\end{flushleft}
\end{par}
\begin{matlabcode}
% Plot both the original data and the best fit line MATLAB graph. Use the figure command to create a new plot and use the
% hold command to retain each line on the graph. You can change line
% colors widths and styles manually. If you want MATLAB to do that for
% you just use the plot command. For example:
%
% figure
% plot(x,y)
% grid on
% hold on
% plot(x,z,'Color','r','LineWidth',2,'LineStyle','--');%
%
% Use help plot to find out more options
% I suggest copying the commands used to create the first graph then
% modifying them to add the second plot.
% Add good titles and good labels to the axes accordingly
% Solution -- Place your code here
figure
plot(sample,signal)
grid on
hold on
plot(sample,driftEstimate,'Color','r','LineWidth',2,'LineStyle','--');
\end{matlabcode}
\begin{center}
\includegraphics[width=\maxwidth{56.196688409433015em}]{figure_1.eps}
\end{center}
\begin{matlabcode}
\end{matlabcode}
\begin{par}
\begin{flushleft}
Press the Button below to Run your code in this section
\end{flushleft}
\end{par}
\begin{matlabcode}
\end{matlabcode}
\matlabheading{Part 3 -- Remove the Effects of Drift}
\vspace{1em}
\matlabheadingtwo{Step 1}
\begin{par}
\begin{flushleft}
Now that we have an estimate of the drift we can remove that effect from the signal just by subtracting the fitted line representing the drift from the original signal. Create a variable called \textless{}signalNoDrift\textgreater{} that is the difference between the original signal and the drift.
\end{flushleft}
\end{par}
\vspace{1em}
\begin{matlabcode}
% Place equation to compute the signal without drift here
% signalNoDrift = ...
% Solution -- Place your code here
signalNoDrift = signal - driftEstimate;
\end{matlabcode}
\begin{par}
\begin{flushleft}
Press the Button below to Run your code in this section
\end{flushleft}
\end{par}
\begin{matlabcode}
\end{matlabcode}
\vspace{1em}
\matlabheadingtwo{Step 2}
\begin{par}
\begin{flushleft}
On a new figure, plot the original signal, the estimate of the drift and the signal with the drift removed on one plot. Create a descriptive title and label the x and y axes properly.
\end{flushleft}
\end{par}
\begin{par}
\begin{flushleft}
Again start with the code that you wrote above to plot both signals and then add a command to plot the third signal with the drift removed. Copy and Paste is your friend!!
\end{flushleft}
\end{par}
\begin{matlabcode}
% Place your code for creating the plot here. Again copy and paste the
% previous plot commands to make it easier. Use different color and line
% styles as desired or let MATLAB choose them for you
%
% Solution -- Place your code here
figure
plot(sample,signal)
grid on
hold on
plot(sample,driftEstimate,'Color','r','LineWidth',2,'LineStyle','--');
plot(sample,signalNoDrift,'Color','g','LineWidth',1);
\end{matlabcode}
\begin{center}
\includegraphics[width=\maxwidth{56.196688409433015em}]{figure_2.eps}
\end{center}
\begin{par}
\begin{flushleft}
Press the Button below to Run your code in this section
\end{flushleft}
\end{par}
\begin{matlabcode}
\end{matlabcode}
\vspace{1em}
\matlabheading{Part 4 -- Estimate the Signal }
\vspace{1em}
\begin{par}
\begin{flushleft}
Often times when we have a signal of interest it also includes noise. We will use statistics to determine the magnitude of that noise and compare it to the magnitude of the signal. The ratio of those two values is the signal to noise ratio or SNR. In particular we will take the variance of the noise which is the square of its standard deviation as an estimate of the noise power.
\end{flushleft}
\end{par}
\begin{par}
\begin{flushleft}
But what about the signal? How do we characterize the magnitude of the signal?
\end{flushleft}
\end{par}
\begin{par}
\begin{flushleft}
Sometimes the signal that we are interested in is a fixed value or a value that changes very little over the measurement interval. An example of this might be a signal from a sensor that only changes a small amount over our measurement period. Another example may be a sinusoidal signal that varies rapidly over our measurement interval. How we estimate the magnitude of each of these signals will be different.
\end{flushleft}
\end{par}
\begin{par}
\begin{flushleft}
To estimate the magnitude of the non-changing or slowly varying signal we can simply take the average of that signal as an \underline{estimate} of the true value of the signal.
\end{flushleft}
\end{par}
\begin{par}
\begin{flushleft}
To estimate the magnitude of the sinusoidal signal in noise we have to know something about the frequency and phase of that signal. There are signal processing approaches that we can use to estimate these values. However, in this case you will be given the values for the frequency and phase.
\end{flushleft}
\end{par}
\vspace{1em}
\matlabheadingtwo{Step 1}
\begin{par}
\begin{flushleft}
For this exercise lets assume that we have estimated what the signal frequency, phase and magnitude is and use that to separate the signal from the noise.
\end{flushleft}
\end{par}
\begin{par}
\begin{flushleft}
Assume that the parameters of the sinusoid are:
\end{flushleft}
\end{par}
\begin{par}
\begin{flushleft}
Period, T -- 181.8182 samples (a pretty precise estimate!)
\end{flushleft}
\end{par}
\begin{par}
\begin{flushleft}
Phase $\phi \;$= 135 degrees
\end{flushleft}
\end{par}
\begin{par}
\begin{flushleft}
Amplitude A = 1.2
\end{flushleft}
\end{par}
\begin{par}
\begin{flushleft}
Then the sinusoid has an equation $y=Asin(\frac{2\pi }{T}n+\frac{\phi }{180}\pi )$ where n is the sample number.
\end{flushleft}
\end{par}
\begin{par}
\begin{flushleft}
Using MATLAB create a variable \textless{}signalEstimate\textgreater{} that is the estimate of the sinusoid by writing an equation for the signal estimate. Then plot that signal on the same graph as the signal with the drift removed. Start by creating three variables, one for A, T and phi respectively. This will help the reader follow your code and make it more flexible if you want to change those values in the future. What is the value n?
\end{flushleft}
\end{par}
\vspace{1em}
\begin{matlabcode}
% Create an estimate the signal
%
% Create variables for the parameters of the sinusoid
% A = ...
% T = ...
% phi = ...
%
% Create a variable for the sinusoid estimate then plot it and the signal
% with the drift removed on the same plot
%
% signalEstimate = ....
% Solution -- Place your code here
A = 1.2;
T = 181.8182;
phi = 135;
signalEstimate = A*sin(((2*pi/T)*sample)+((phi/180)*pi));
\end{matlabcode}
\begin{par}
\begin{flushleft}
Press the Button below to Run your code in this section
\end{flushleft}
\end{par}
\begin{matlabcode}
\end{matlabcode}
\vspace{1em}
\matlabheadingtwo{Step 2}
\begin{par}
\begin{flushleft}
Now plot the signal with the drift removed and the estimated signal on the same graph. Add a title and axes labels.
\end{flushleft}
\end{par}
\begin{matlabcode}
% Plot the signal with the drift removed and the estimated signal on the
% same graph
%
% Solution -- Place your code here
figure
plot(sample,signalNoDrift)
grid on
hold on
plot(sample,signalEstimate,'Color','r','LineWidth',2,'LineStyle','--');
\end{matlabcode}
\begin{center}
\includegraphics[width=\maxwidth{56.196688409433015em}]{figure_3.eps}
\end{center}
\begin{matlabcode}
\end{matlabcode}
\begin{par}
\begin{flushleft}
Press the Button below to Run your code in this section
\end{flushleft}
\end{par}
\begin{matlabcode}
\end{matlabcode}
\vspace{1em}
\matlabheading{Part 5 -- Estimate the noise signal}
\vspace{1em}
\matlabheadingtwo{Step 1}
\begin{par}
\begin{flushleft}
Now that we have a pretty good estimate of the signal, we can remove the signal from the noise leaving and estimate of the noise signal. Then we can estimate the power of the noise using the variance.
\end{flushleft}
\end{par}
\begin{par}
\begin{flushleft}
Create a variable \textless{}noise\textgreater{} by taking the difference between the signal with the drift removed and subtracting the signal estimate. Plot this value versus the sample.
\end{flushleft}
\end{par}
\vspace{1em}
\begin{matlabcode}
% Create an estimate of the noise and plot the noise estimate on a graph by
% itself
%
% noise = ...
% Solution -- Place your code here
noise = signalNoDrift - signalEstimate;
\end{matlabcode}
\begin{par}
\begin{flushleft}
Press the Button below to Run your code in this section
\end{flushleft}
\end{par}
\begin{matlabcode}
\end{matlabcode}
\matlabheading{Part 6 Estimate the noise power and signal to noise ratio}
\vspace{1em}
\matlabheadingtwo{Step 1}
\begin{par}
\begin{flushleft}
Calculate the noise power by taking its variance. MATLAB does have a variance \textless{}var\textgreater{} command but we can also use the command for standard deviation and square it to get the variance. The MATLAB command for standard deviation is \textless{}std\textgreater{}.
\end{flushleft}
\end{par}
\begin{par}
\begin{flushleft}
Calculate the variance of a few other signals to compare:
\end{flushleft}
\end{par}
\begin{enumerate}
\setlength{\itemsep}{-1ex}
\item{\begin{flushleft} Variance of the original signal --- varOrig \end{flushleft}}
\item{\begin{flushleft} Variance of the signal with the drft removed -- varNoDrift \end{flushleft}}
\item{\begin{flushleft} Variance of the estimated sinusoidal signal -- varSignal \end{flushleft}}
\item{\begin{flushleft} Variance of the noise -- varNoise \end{flushleft}}
\end{enumerate}
\begin{matlabcode}
% Compute the variance of the signals by taking the square of the standard
% deviation of the signal.
%
% varOrig =
% varNoDrift =
% varSignal =
% varNoise =
%
% Solution -- Place your code here
varOrig = (std(signal))^2;
varNoDrift = (std(signalNoDrift))^2;
varSignal = (std(signalEstimate))^2;
varNoise = (std(noise))^2;
\end{matlabcode}
\begin{par}
\begin{flushleft}
Press the Button below to Run your code in this section
\end{flushleft}
\end{par}
\begin{matlabcode}
\end{matlabcode}
\vspace{1em}
\matlabheadingtwo{Step 2}
\begin{par}
\begin{flushleft}
Then calculate the signal to noise ratio (SNR) of the desired sinusoid and the noise. Since we are using variances which are squared values of magnitude, these represent power (Hint: Think of the power of an electrical signal dissipated in a resistor $P=\frac{E^2 }{R}$). When we compute the SNR in decibels in this case we are taking the ratio of powers so the SNR in decibels is
\end{flushleft}
\end{par}
\begin{par}
$${\textrm{SNR}}_{\textrm{dB}} =10\log_{10} \left({\textrm{SNR}}_{\textrm{num}} \right)=10\log_{10} \left(\;\frac{\left(\textrm{Signal}\;\textrm{Variance}\right)}{\left(\textrm{Noise}\;\textrm{Variance}\right)}\right)$$
\end{par}
\begin{matlabcode}
% Compute the signal to noise ratio numerically and in decibels
%
% snrNum = % The numerical signal to noise ratio (SNR)
% snrDb = % The signal to noise ration (SNR) in decibels
% Solution -- Place your code here
snrNum = varSignal / varNoise;
snrDb = 10*log10(snrNum);
\end{matlabcode}
\begin{par}
\begin{flushleft}
Press the Button below to Run your code in this section
\end{flushleft}
\end{par}
\begin{matlabcode}
\end{matlabcode}
\matlabheadingtwo{Step 3}
\begin{par}
\begin{flushleft}
Display the values using a table in MATLAB
\end{flushleft}
\end{par}
\vspace{1em}
\begin{par}
\begin{flushleft}
Use the 'table' function in MATLAB. I've created the table for you this time. You can use this as a template to create later tables. Use the help feature of MATLAB to look up how to enter values in a table. The values of a column must be a column vector. Use the Properties 'RowName' and 'VariableNames' to add row names and column names respectively. Note that the list of row names and variable names must be a MATLAB cell array which is a data type that is enclosed by curly braces. For example a = \{ 'first', 'second', 'third'\} is a cell array.
\end{flushleft}
\end{par}
\begin{par}
\begin{flushleft}
If you used the variable names that I used above, this should work OK. Modify the following code as necessary
\end{flushleft}
\end{par}
\begin{matlabcode}
% Create a column vector with the values for the table.
% Each value for the statistics is in one row.
% Recall that placing a semicolon (instead of a space or comma) between
% values creates a column vector.
valuesForTable = [varOrig; varNoDrift; varSignal; varNoise; snrNum; snrDb];
% Create the table. Add Row Names and a Name for the column of values
statsTable = table(valuesForTable,...
'RowNames',{'Original Variance','No Drift Variance','Estimated Signal Variance','Noise Variance','SNR (numerical)','SNR (dB)'},...
'VariableNames',{'Values'})
\end{matlabcode}
\begin{matlabtableoutput}
{
\begin{tabular} {|c|c|}\hline
\mlcell{ } & \mlcell{Values} \\ \hline
\mlcell{1 Original Variance} & \mlcell{6.3632} \\ \hline
\mlcell{2 No Drift Variance} & \mlcell{1.0328} \\ \hline
\mlcell{3 Estimated Signal Variance} & \mlcell{0.7184} \\ \hline
\mlcell{4 Noise Variance} & \mlcell{0.3342} \\ \hline
\mlcell{5 SNR (numerical)} & \mlcell{2.1497} \\ \hline
\mlcell{6 SNR (dB)} & \mlcell{3.3239} \\
\hline
\end{tabular}
}
\end{matlabtableoutput}
\begin{matlabcode}
\end{matlabcode}
\begin{par}
\begin{flushleft}
Press the Button below to Run your code in this section
\end{flushleft}
\end{par}
\begin{matlabcode}
\end{matlabcode}
\matlabheading{Part 6 Write your output to an PDF file}
\vspace{1em}
\begin{par}
\begin{flushleft}
Make sure that you add your lab section to the top of this file. Add all the names of the team members to the file and the name of the team leader.
\end{flushleft}
\end{par}
\begin{par}
\begin{flushleft}
Export the completed file with all of the graphs properly titled and labeled as a PDF file. Use Save\textbackslash{}Export as PDF from the tool bar.
\end{flushleft}
\end{par}
\begin{par}
\begin{flushleft}
Open the PDF file and make sure that it includes everything in this file. Sometimes there are rendering problems and I have had best luck with saving the file first as a Word file and then saving the Word file as a PDF.
\end{flushleft}
\end{par}
\begin{par}
\begin{flushleft}
Upload \underline{both} this completed Live Script file and the PDF file to Assignments section of myCourses.
\end{flushleft}
\end{par}
\end{document}

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,104 @@
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{matlab}
\RequirePackage{verbatim}
\RequirePackage{fancyvrb}
\RequirePackage{alltt}
\RequirePackage{upquote}
\RequirePackage[framemethod=tikz]{mdframed}
\RequirePackage{hyperref}
\RequirePackage{color}
\newcommand{\maxwidth}[1]{\ifdim\linewidth>#1 #1\else\linewidth\fi}
\newcommand{\mlcell}[1]{{\color{output}\verbatim@font#1}}
\definecolor{output}{gray}{0.4}
% Unicode character conversions
\DeclareUnicodeCharacter{B0}{\ensuremath{^\circ}}
\DeclareUnicodeCharacter{21B5}{\ensuremath{\hookleftarrow}}
% Paragraph indentation
\setlength{\parindent}{0pt}
% Hyperlink style
\hypersetup{
colorlinks=true,
linkcolor=blue,
urlcolor=blue
}
% environment styles for MATLAB code and output
\mdfdefinestyle{matlabcode}{%
outerlinewidth=.5pt,
linecolor=gray!20!white,
roundcorner=2pt,
innertopmargin=.5\baselineskip,
innerbottommargin=.5\baselineskip,
innerleftmargin=1em,
backgroundcolor=gray!10!white
}
\newenvironment{matlabcode}{\verbatim}{\endverbatim}
\surroundwithmdframed[style=matlabcode]{matlabcode}
\newenvironment{matlaboutput}{%
\Verbatim[xleftmargin=1.25em, formatcom=\color{output}]%
}{\endVerbatim}
\newenvironment{matlabsymbolicoutput}{%
\list{}{\leftmargin=1.25em\relax}%
\item\relax%
\color{output}\verbatim@font%
}{\endlist}
\newenvironment{matlabtableoutput}[1]{%
{\color{output}%
\hspace*{1.25em}#1}%
}{}
% Table of Contents style
\newcounter{multititle}
\newcommand{\matlabmultipletitles}{\setcounter{multititle}{1}}
\newcounter{hastoc}
\newcommand{\matlabhastoc}{\setcounter{hastoc}{1}}
\newcommand{\matlabtitle}[1]{
\ifnum\value{multititle}>0
\ifnum\value{hastoc}>0
\addcontentsline{toc}{section}{#1}
\fi
\fi
\section*{#1}
}
\newcommand{\matlabheading}[1]{
\ifnum\value{hastoc}>0
\addcontentsline{toc}{subsection}{#1}
\fi
\subsection*{#1}
}
\newcommand{\matlabheadingtwo}[1]{
\ifnum\value{hastoc}>0
\addcontentsline{toc}{subsubsection}{#1}
\fi
\subsubsection*{#1}
}
\newcommand{\matlabheadingthree}[1]{
\ifnum\value{hastoc}>0
\addcontentsline{toc}{paragraph}{#1}
\fi
\paragraph*{#1}
}
\newcommand{\matlabtableofcontents}[1]{
\renewcommand{\contentsname}{#1}
\tableofcontents
}

2
week1/workBreakdown.txt Normal file
View file

@ -0,0 +1,2 @@
All responses to questions were written by Blizzard.
Error-checking and coding instructions were given by both Eileen and Hale.

BIN
week2/Lab_2_Procedure.mlx Normal file

Binary file not shown.

File diff suppressed because it is too large Load diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

View file

@ -0,0 +1,104 @@
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{matlab}
\RequirePackage{verbatim}
\RequirePackage{fancyvrb}
\RequirePackage{alltt}
\RequirePackage{upquote}
\RequirePackage[framemethod=tikz]{mdframed}
\RequirePackage{hyperref}
\RequirePackage{color}
\newcommand{\maxwidth}[1]{\ifdim\linewidth>#1 #1\else\linewidth\fi}
\newcommand{\mlcell}[1]{{\color{output}\verbatim@font#1}}
\definecolor{output}{gray}{0.4}
% Unicode character conversions
\DeclareUnicodeCharacter{B0}{\ensuremath{^\circ}}
\DeclareUnicodeCharacter{21B5}{\ensuremath{\hookleftarrow}}
% Paragraph indentation
\setlength{\parindent}{0pt}
% Hyperlink style
\hypersetup{
colorlinks=true,
linkcolor=blue,
urlcolor=blue
}
% environment styles for MATLAB code and output
\mdfdefinestyle{matlabcode}{%
outerlinewidth=.5pt,
linecolor=gray!20!white,
roundcorner=2pt,
innertopmargin=.5\baselineskip,
innerbottommargin=.5\baselineskip,
innerleftmargin=1em,
backgroundcolor=gray!10!white
}
\newenvironment{matlabcode}{\verbatim}{\endverbatim}
\surroundwithmdframed[style=matlabcode]{matlabcode}
\newenvironment{matlaboutput}{%
\Verbatim[xleftmargin=1.25em, formatcom=\color{output}]%
}{\endVerbatim}
\newenvironment{matlabsymbolicoutput}{%
\list{}{\leftmargin=1.25em\relax}%
\item\relax%
\color{output}\verbatim@font%
}{\endlist}
\newenvironment{matlabtableoutput}[1]{%
{\color{output}%
\hspace*{1.25em}#1}%
}{}
% Table of Contents style
\newcounter{multititle}
\newcommand{\matlabmultipletitles}{\setcounter{multititle}{1}}
\newcounter{hastoc}
\newcommand{\matlabhastoc}{\setcounter{hastoc}{1}}
\newcommand{\matlabtitle}[1]{
\ifnum\value{multititle}>0
\ifnum\value{hastoc}>0
\addcontentsline{toc}{section}{#1}
\fi
\fi
\section*{#1}
}
\newcommand{\matlabheading}[1]{
\ifnum\value{hastoc}>0
\addcontentsline{toc}{subsection}{#1}
\fi
\subsection*{#1}
}
\newcommand{\matlabheadingtwo}[1]{
\ifnum\value{hastoc}>0
\addcontentsline{toc}{subsubsection}{#1}
\fi
\subsubsection*{#1}
}
\newcommand{\matlabheadingthree}[1]{
\ifnum\value{hastoc}>0
\addcontentsline{toc}{paragraph}{#1}
\fi
\paragraph*{#1}
}
\newcommand{\matlabtableofcontents}[1]{
\renewcommand{\contentsname}{#1}
\tableofcontents
}

3
week2/workBreakdown.txt Normal file
View file

@ -0,0 +1,3 @@
Code was written by Blizzard.
Eileen answered questions.
Hale was unavailable.