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

4 views (last 30 days)
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!

Answers (1)

the cyclist
the cyclist on 20 Mar 2017
Edited: the cyclist on 20 Mar 2017
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.

Tags

Products

Community Treasure Hunt

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

Start Hunting!