How to get interval value between values inside array?
30 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Prasanth Warrier
le 11 Nov 2020
Commenté : Ameer Hamza
le 11 Nov 2020
I have an array created with this command
t = [0:0.01:0.99 1:0.1:9.9 10:1:100];
this creates 281 columns
I want to know difference between each columns
like time interval between 2nd and 1st colulmn and between 2nd and 3rd like wise.
How do i go about it?
0 commentaires
Réponse acceptée
Ameer Hamza
le 11 Nov 2020
Use diff()
t = [0:0.01:0.99 1:0.1:9.9 10:1:100];
dt = diff(t);
2 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Matrices and Arrays dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!