Info

This question is closed. Reopen it to edit or answer.

How does one differentiate in matlab

1 view (last 30 days)
How does one differentiate and plot in matlab

Accepted Answer

Ameer Hamza
Ameer Hamza on 14 May 2018
Edited: Ameer Hamza on 14 May 2018
diff() decrease the number of elements in a vector by one. You also need to exclude one element of vector x to make them of equal length.
plot(x(2:end), v) % or
plot(x(1:end-1), v)

More Answers (0)

This question is closed.

Community Treasure Hunt

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

Start Hunting!