Hey Safaa,
It appears that u are looking to control stepper motor using MATLAB and L293D driver.
MATLAB handles the timing and digital pin writing compared to the Arduino IDE. MATLAB might not be able to achieve the precise timing required for controlling the stepper motor, resulting in the motor not moving correctly or at a fixed speed regardless of the delay time.
I would recommend you to install the support package for ardunio hardware and then try to control the motor.
You can use L293D motor block controls to control the motor.
Kindly refer to the below mentioned resources from MathWorks to understand about the support package and controlling motor using Arduino board.
Hope it helps.