how can we use dynamic memory allocation in matlab?
Show older comments
In other words what would be the closest functions to "calloc", "malloc", "free" etc in matlab?
Answers (1)
Jan
on 29 Mar 2022
malloc and calloc is performed by:
a = zeros(1, 1e6)
A free is useful under rare conditions also (huge arrays, memory exhausted):
clear('a')
1 Comment
Imtiaz nabi
on 29 Mar 2022
Categories
Find more on Shifting and Sorting Matrices in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!