Info
This question is closed. Reopen it to edit or answer.
How does one differentiate in matlab
1 view (last 30 days)
Show older comments
Abhey Pal Singh Kumar
on 14 May 2018
Closed: Abhey Pal Singh Kumar
on 14 May 2018
How does one differentiate and plot in matlab
0 Comments
Accepted Answer
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)
0 Comments
More Answers (0)
This question is closed.
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!