from
Pointers Toolbox
by Ben Petschel
basic functions to work with pointer variables and dynamic data types
|
| ptr=malloc(x)
|
function ptr=malloc(x)
% ptr/malloc: create a pointer to variable
% usage: ptr = malloc
% ptr = malloc(x)
%
% malloc assigns a slot in virtual memory to store the variable (or [] if x
% is not provided) and returns a pointer to it.
%
%
% See also: mread, mwrite, malloc, mfree
% Author: Ben Petschel 31/8/2009
% Version History:
% 31/8/2009 - initial release
if nargin==0
ptr = mmgr(3);
else
ptr = mmgr(3,x);
end;
|
|
Contact us at files@mathworks.com