I am using the matlab function block to execute the logic. For that i am using some variables but they get initialize at every sample time. Due to this my logic is not working properly. I want the variable only get initialize onces in whole simulation. so any possible solution to this type of problem?