handle to a variable



GDay,

im using matlab R2008a.

To talk in C language: Is there a possibility to create a
pointer to a variable?

In matlab i should say: Is it possible to create a handle to
a variable?

----
I already tried one possiblilty. It works, but im not
satisfied with the solution.
I wrote a small class definition:

classdef handleClass < handle;
properties
Values
end
end

-

I create an object of the class:
F = handleClass;
and fill it with values:
F.Values = [1 2 3];

F is an handle and if i use the assign operator (=) matlab
creates a new handle and does not copy the actual Values.
F2 = F; %creates a new handle

.



Relevant Pages

  • Re: Saving and loading class objects
    ... I can load the .mat without problem before ... after I close matlab and reopen I get the ... Variable 'testECG' originally saved as a ecg cannot be ... Make sure the class definition file is available to MATLAB at the time the ...
    (comp.soft-sys.matlab)
  • R2006b very slow?
    ... recently I updated matlab to the new version and was shocked by the loss of performance. ... I have running a computation tool that uses a class definition including overloaded operators. ...
    (comp.soft-sys.matlab)
  • Re: mxGetNumberOfDimensions missing ?
    ... integer, intent, dimension, pointer:: plhs ... end function mxGetData ... I have checked my matlab documentation to confirm that the function exists. ... Since I am utterly new to mex programming (not new to Fortran (a bit rusty) or Matlab), I am guessing that the address to the arrays is returned as an integer that you can use a fortran pointer to point to. ...
    (comp.soft-sys.matlab)
  • Re: OT: C++ overloading operators
    ... No, the reason is faith. ... Matlab and Labview are complete nuisance as the general purpose programming languages. ... matlab is a good programming language. ...
    (comp.dsp)
  • pointer to struct to use in a DLL
    ... i'm trying to evaluate the feasibility of this method by creating a few functions based on the structure type i use, but i seem not to be able to pass a pointer to a structure from matlab to the DLL. ...
    (comp.soft-sys.matlab)