Hi im making a connection with matlab and i have a problem :) okbro=sim.simxSetIntegerSignal(clientID,'ok1',0,sim.simx_opmode_oneshot_wait);
when i have the operation mode oneshot_wait it always gives me 0 and if i dont have the wait part it always gives me one but i obviously want it to change between 0 and 1. really lost on this one.
not sure what you want to achieve. Have a look at what the return codes mean. Setting an integer signal will not return anything useful (it is setting something, not getting something), except whether the function executed correctly (that's the return code).
is just fine, and will set that signal OK1 to 0, in CoppeliaSim. Make sure to carefully read how the legacy remote API works, in order to avoid confusions.