How change the slopes in a curve from positive to negative
8 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
We hve a set of data points representing a curve.when the y value is greater than 345, for any line between two points, if the line had a positive slope we need to flip its sign and make it negative. attached is the data we are using and an image of the part of the curve that we would like to modify
Any idea how this can be done?
2 commentaires
Réponses (1)
chicken vector
le 10 Juil 2023
This works if you don't really care about the value on the y-axis:
load datapoints
inyb2 = -cumsum(abs(diff([0; inyb2])));
plot(inxb2,inyb2);
0 commentaires
Voir également
Catégories
En savoir plus sur Annotations 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!