# Engineering elct

For full credit:

Include question, matlab code used determine answer and your answer. Submit as pdf.

1) Create a function called step_fn(t).

This is also common to call this function u(t) or u_fn(t)

Input: time vector

Output: a vector of the same length with values of 0 if t<0, and 1 otherwise

2) Create a function called ramp_fn(t)

This is also common to call this function r(t), r_fn(t) or tu(t)

Input: time vector

Output: a vector of the same length with values of 0 if t<0, and t otherwise

3) Create a function called g1_fn(t)

This function should be equal to step_fn(t) + ramp_fn(t) – ramp_fn(t-3) -3*step_fn(t-5)

4) Plot the following functions (can put on one plot or use subplots — decide how to best present the functions).

u(t)

u(t-2)

2u(t)

-3u(t+2)

5) Plot the following functions (can put on one plot or use subplots — decide how to best present the functions).

r(t)

r(t-2)

2r(t)

-3r(t+2)

6) Plot the following functions (can put on one plot or use subplots — decide how to best present the functions).

sin(t)u(t)

sin(t)u(t-π)

sin(t-π)u(t-π)

7) Plot the following functions (can put on one plot or use subplots — decide how to best present the functions).

g(t)

g(t-2)

g(2t)

g(t/2)

8) Write a script to determine the balance in a saving account at the end of every year for n = years. The account has an initial investment of A$ and the interest rate is r, and compounds annually. Show the script should request

Initial investment amount

Interest rate

years

if should create a vector for number of year [1:n], and the balance after each year

Balance = A(1 + r/100)n

## We've got everything to become your favourite writing service

### Money back guarantee

Your money is safe. Even if we fail to satisfy your expectations, you can always request a refund and get your money back.

### Confidentiality

We don’t share your private information with anyone. What happens on our website stays on our website.

### Our service is legit

We provide you with a sample paper on the topic you need, and this kind of academic assistance is perfectly legitimate.

### Get a plagiarism-free paper

We check every paper with our plagiarism-detection software, so you get a unique paper written for your particular purposes.

### We can help with urgent tasks

Need a paper tomorrow? We can write it even while you’re sleeping. Place an order now and get your paper in 8 hours.

### Pay a fair price

Our prices depend on urgency. If you want a cheap essay, place your order in advance. Our prices start from $11 per page.