klabhub / neurostim

Design and run visual neuroscience experiments using Matlab and the Psychophysics Toolbox.
MIT License
4 stars 3 forks source link

Reading a private property of movie.m #179

Closed dshimaoka closed 2 years ago

dshimaoka commented 2 years ago

To trigger a digital signal at a desired condition, I wish to access a private property (fracFrameCntr) inside an eScript.

One way to do this is to change this property to GetAccess = public and SetAccess = private.

Another way is to make a function like below:

methods (Access = public)
        function v = getFracFrameCntr(o)
            v = o.fracFrameCntr;
        end

Which way is more preferable?

bartkrekelberg commented 2 years ago

For this purpose (public read access only) just changing the property GetAccess/SetAccess is the right way to do it.

dshimaoka commented 2 years ago

thanks for the suggestion. A new pull request will soon follow.