About plotting piecewise function.

why Matlab says index exceeds matrix dimensions at line 3? Thanks

 Accepted Answer

See if using:
for k = 1:length(t)
instead, works correctly in your code.

More Answers (0)

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!