What is a good way to check if a array had expanded?

3 ビュー (過去 30 日間)
Jeff Bryan
Jeff Bryan 2017 年 3 月 20 日
編集済み: the cyclist 2017 年 3 月 20 日
Hi All,
I have a expanding array that add in the current temperature value everytime my temperature sensor detect the current temperature to be 10°C and below. I would like to ask what is a good way to check if my array had expanded, example from 33 to 34 element?
Thank You!

回答 (1 件)

the cyclist
the cyclist 2017 年 3 月 20 日
編集済み: the cyclist 2017 年 3 月 20 日
You can use the size function.
Be aware, though, that organically "growing" an array like that, especially if it is large, will lead to poor memory usage, and slow execution time.

カテゴリ

Help Center および File ExchangeMatrix Indexing についてさらに検索

タグ

製品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by