How to add time from 2 arrays
古いコメントを表示
Hi, I am a new user of Matlab. I have the following problem:
I have two columns like this way.
- a =102 sec
- a =135
- a =157
- b =189
- b =201
- a =222
- a =245
- b =290
Here the values are in seconds. I want to write a formula, which show the total duration of seconds of a and b.
For example: here total duration of a is = (157-102) + (245-222) = 78 seconds.
Please suggest me how to do it.
Thanks
6 件のコメント
José-Luis
2014 年 10 月 16 日
What does
a 102 a 135 a 157 b 189 b 201 a 222 a 245 b 290
mean?
José-Luis
2014 年 10 月 16 日
I still don't see the two columns.
SS
2014 年 10 月 16 日
José-Luis
2014 年 10 月 16 日
So is your variable a table or do you have two column vectors: one with strings and the other with numbers?
SS
2014 年 10 月 16 日
採用された回答
その他の回答 (1 件)
カテゴリ
ヘルプ センター および File Exchange で Operators and Elementary Operations についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!