I want to program an arduino using matlab by "arduino support package" and I want to use simulink in normal input output operations but also use Matlab language in another part so is it possible to make a code consist of simulink model and matlab language and add this code to arduino ? and if it possible how to make it ?
You can use from simulink library browser under User-defined functions figure out which one is suitable for your system.
If you get some delay while calling Matlab function than you can also use a sybsytem as matlab function because matlab function gives output in delay in terms of calling function and returning the value but if you generate the same function im simulink model then output will be without delayed version as shown in the figure
You can run a reduced version of the matlab language in Simulink using the Matlab function block, but I doubt this includes arduino commands.
You can extend this reduced version of the Matlab language by declaring the external functions which you would like to use, with the coder.extrinsic command. here is a tutorial on how to do this.