I am trying to merge a number of command lines instructions into a function. But I have noticed that instructions which I can run without errors on command lines could not be run within a function. For example, I could write to registers below at the command line such as below -
NPSN.REGISTER.LOAD.LOAD_TYPE1.write = 0;
NPSN.REGISTER.LOAD.LOAD_TYPE2.write = 1;
The same command lines will not have any effect within a function due to workspace segregations. While I could understand that concept, does Matlab provides anyway for us to change the value of these registers within a function?
These registers are actual hardware registers in the controllers which are written through Matlab.