I'm having trouble solving this question: Write the MATLAB statements required to calculate y(t) from the equation y(t) = -3*t^2 + 5 when t>=0
y(t) = 3*t^2 + 5 when t<0
for the values of t between -9 and 9 in steps of .5. Use loops and branches to solve
Heres what i have;
for t = -9:.5:9
if t<0 y=(3*t.^2)+5; else if t>=0 y=(-3*t.^2)+5; end endendplot(y,t)
I know Im missing something, like maybe count=0; and count = count + 1 but I've tried it still was unsuccessful
Best Answer