Question: D . 4 ( a ) Write a function called unitstep that takes a single real argument t and returns u ( t ) ,
Da Write a function called unitstep that takes a single real argument t and returns ut where
ut
t
otherwise.
b Modify the function from part a so that it takes a single vector argument t t t tn
T
where n and
tttn are real and returns the vector ut ut utn
T
Your solution must employ a looping construct
eg a for loop
c With some ingenuity, part b of this exercise can be solved using only two lines of code, without the need
for any looping construct. Find such a solution. Hint: In MATLAB, to what value does an expression like
evaluate?
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
