Error using / Arguments must be numeric, char, or logical.
22 views (last 30 days)
Image Analyst on 22 May 2022
You can get rid of the (t) in plot. Also get rid of the braces in the definition of y because that puts what's inside of the braces into a cell and you can't subtract a cell from a number. See the FAQ:
You can also use exp instead of raising 2.718 to a power. Fixed code:
t = 0 : 10;
y = exp(-t/5) - exp(-t/5) .* t / 5;
plot(t, y, 'b-');