how Slope of a line?
Afficher commentaires plus anciens
I have plotted data and i want to obtain the gradient of the different sections of the line plot.How do i obtain the slope for the similar sections for
t=[ 1 2 3 4 5 6];
v=[10 25 30 40 45 50];
plot(t,v)
Réponses (1)
Azzi Abdelmalek
le 17 Nov 2013
Modifié(e) : Azzi Abdelmalek
le 17 Nov 2013
diff(v)./diff(t)
2 commentaires
Image Analyst
le 21 Nov 2013
What sections do you want? You can extract sections like this:
section1 = v(index1:index2);
where you, of course, specify the starting and ending indices of the section you want to extract.
Catégories
En savoir plus sur Line Plots dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!