4 ms·
You might consider looking into putting the matrix elements onto the heap with malloc -- that way you won't limit the matrices to MAX_ELEMENTS and you also won'
by Boxxed 8y ago
You might consider looking into putting the matrix elements onto the heap with malloc -- that way you won't limit the matrices to MAX_ELEMENTS and you also won't waste lots of space for small matrices.
It'll complicate the usage a bit (you'll have to add allocate and free functions) but it's a good pattern to learn.
- webdva 8y agoThank you for the feedback! However, to dynamically allocate memory would be detrimental to this project as its purpose is to provide a simple and effective means for performing matrix operations on embedded systems, that is, microcontrollers. But I'll clarify that in the documentation thanks to your feedback!