EECS 1541 - Introduction to Computing for the Physical Sciences
1
EECS 1541 - Introduction to Computing for the Physical Sciences
Arrays
Vectors and matrices are used to store set of values.
Like an array, vectors and matrices can be visualized as a tabl

EECS 1541 - Introduction to Computing for the Physical Sciences
1
EECS 1541 - Introduction to Computing for the Physical Sciences
Loops
Loops allow you to repeatedly execute blocks of statement
2 types of loops: counted loop and conditional loop
A coun

EECS 1541 - Introduction to Computing for the Physical Sciences
1
EECS 1541 - Introduction to Computing for the Physical Sciences
MATLAB Scripts
A script is a text file containing a sequence of MATLAB commands
Each command usually occurs on a separate l

EECS 1541 - Introduction to Computing for the Physical Sciences
1
EECS 1541 - Introduction to Computing for the Physical Sciences
Selection statements
So far all of our scripts and functions have been made up of statements
A selection statement uses a l

EECS 1541 - Introduction to Computing for the Physical Sciences
1
EECS 1541 - Introduction to Computing for the Physical Sciences
Selection statements
So far all of our scripts and functions have been made up of statements
A selection statement uses a l

EECS 1541 - Introduction to Computing for the Physical Sciences
1
EECS 1541 - Introduction to Computing for the Physical Sciences
Selection statements
So far all of our scripts and functions have been made up of statements
A selection statement uses a l

EECS 1541 - Introduction to Computing for the Physical Sciences
1
EECS 1541 - Introduction to Computing for the Physical Sciences
MATLAB Scripts
A script is a text file containing a sequence of MATLAB commands
Each command usually occurs on a separate l

EECS 1541 - Introduction to Computing for the Physical Sciences
1
EECS 1541 - Introduction to Computing for the Physical Sciences
MATLAB Scripts: Input statements
Simplest input function in MATLAB is called input
To call it, a string is passed at the pr

function [ sorted , m ] = q3sort( array )
arz = 1:length(array);
for m = 1:length(array)
p = 0;
for l = 1:length(array)
q = array(l);
if q >= p
p = q;
end
end
r= find(array>=(p),1);
arz(m) = p;
array(r) = [];
end
sorted = arz
m = mode(arz)
end

EECS 1541 - Introduction to Computing for the Physical Sciences
1
EECS 1541 - Introduction to Computing for the Physical Sciences
Arrays
Vectors and matrices are used to store set of values.
Like an array, vectors and matrices can be visualized as a tabl

EECS 1541 - Introduction to Computing for the Physical Sciences
1
EECS 1541 - Introduction to Computing for the Physical Sciences
Arrays
Vectors and matrices are used to store set of values.
Like an array, vectors and matrices can be visualized as a tabl

Sales Performance Model
This model analyses the sales achieved by a team of sales people according to varying
criteria - for example, simple totals, totals by region, average commissions, average sales
price by region and so on.
Name
BERNIER
BERNIER
BERNI

Comments
Comments - Sales Discount Model
The Discounts worksheet in this model contains a list of product codes for items sold in a
store, a status code for that product (D means discontinued and C means current), the
quantity of the product in stock and

The Adder worksheet implements a 4-bit full adder using logic functions.
The user enters binary values for A and B and the adder performs the addition.
This is accomplished by defining the output for each logic gate in the diagram.
Named Ranges:
A
=Adder!

Sumeet Brar_x000D_213952098
Comments
The sales_record worksheet contains the names of sales people (ex.real estate
or commercial sales people) and the amount of sales they have made (in dollars)
This model will make use of an IF function. There are two po

Comments:
The Monthly budget worksheet shows the sources of the total income and expenses for the months of May, June,
for the months of May, June, July, and August. It uses the total expense and total income to calculate the monthly surplus.
culate the m

EECS 1541 - Introduction to Computing for the Physical Sciences
1
EECS 1541 - Introduction to Computing for the Physical Sciences
Matrices in MATLAB (Part III)
Array operations on vectors and matrices
Matrix multiplication
Relational expressions with v

EECS 1541 - Introduction to Computing for the Physical Sciences
1
EECS 1541 - Introduction to Computing for the Physical Sciences
Matrices in MATLAB (Part III)
Array operations on vectors and matrices
Matrix multiplication
Relational expressions with v

EECS 1541 - Introduction to Computing for the Physical Sciences
1
EECS 1541 - Introduction to Computing for the Physical Sciences
Constants
Recall that variables are used to store values that might change
Constants are values that cannot be changed at a

EECS 1541 - Introduction to Computing for the Physical Sciences
1
EECS 1541 - Introduction to Computing for the Physical Sciences
Constants
Recall that variables are used to store values that might change
Constants are values that cannot be changed at a

EECS 1541 - Introduction to Computing for the Physical Sciences
1
EECS 1541 - Introduction to Computing for the Physical Sciences
Matrices in MATLAB (Part III)
Array operations on vectors and matrices
Matrix multiplication
Relational expressions with v

% LAB2 NOOR ELAHI 213317375
% PART 1 a
fm = 10000;
fc=20000;
k=0.2;
t= 0:0.000001:0.001;
m = 3*cos(2*pi*fm.*t);
c = 10*cos(2*pi*fc*t);
s = (1+k*m).*c;
figure;
subplot(2,1,1);
grid;
plot(t,m);
xlabel('Time (s)');
ylabel('m = 3*cos(2*pi*fm.*t)');
title('plo