Change sign of descending values
2 次查看(过去 30 天)
显示 更早的评论
How can i change the sign of decending values ?
4165
4230
4296
4361
4430
4476
4549
4604
4664
4705
4710
4714
4718
4718
4716
4713
4708
4697
4646
4572
4491
采纳的回答
James Tursa
2019-6-27
Is this what you want?
x = your vector of values
d = [1;diff(x)];
x(d<0) = -x(d<0);
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 File Operations 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!