matlab model implemented