Finding difference between all consecutive values within an cell array
5 ビュー (過去 30 日間)
古いコメントを表示
Systematically Neural
2021 年 3 月 9 日
コメント済み: Systematically Neural
2021 年 3 月 9 日
I have a cell array with 100 cells in it. There are differing number of values within each array. I am looking to find the values between each consecutive value in each cell array. So for the fifth cellarray{1,5}, there are 4 values (629, 657, 969, 1197), I want to find the difference between 629-657, 657-969, 969-1197. I want to do this for all arrays. I am not sure how to do this.
I have attached the cell array. Any help would be greatly appreciated.
0 件のコメント
採用された回答
Ruger28
2021 年 3 月 9 日
I did not download your .mat, but you can just take the diff of that cell array
MyCell{1,5} = [629, 657, 969, 1197];
CellDiff = diff(MyCell{1,5});
CellDiff = 28 312 228
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Cell Arrays についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!