How to take a difference within the data of the same city but not across the city, Part 3
16 次查看(过去 30 天)
显示 更早的评论
I have a table
City Date Cumulative_Visitors
-----------------------
NY January 1 100
NY January 2 150
NY January 3 200
SF January 1 70
SF January 2 200
SF January 3 400
I explained the problem of calculating the new_visitors.
If I just use "diff", then, it will create a problem at the first entry of each city.
Then the idea is
run diff
then replace the first entry of each city with the cumulative_visitor of that day
How can one write "replace the first entry of each city with the cumulative_visitor of that day"?
2 个评论
John D'Errico
2020-12-8
STOP ASKING THE SAME QUESTOIN REPEATEDLY. While you claim this is different, it is the same thing you asked before.
采纳的回答
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Automated Driving Toolbox 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!