Arduino uno + Bluetooth HC-05 + Matlab

Hello guys, I need help. I need to send some numbers to the arduino via bluetooth and then send them back to the matlab. I am using arduino uno + bluetooth Hc-05 + matlab R2015a. I created a test program to verify that the data coming into the Arduino. When i send number 1 led on the arduino turn ON, 0 Turn OFF. Serial communication working fine. But i have problem with the bluetooth. To make you understand: In the matlab I enter numbers in the order(" Enter the value 0-1 :1", then "Enter the value 0-1 :0", I do this 5 times. When I got through serial communication so it works. This means that the diode turn on and turn off every time I enter it in matlab. And back in the matlab I get "Irecieved:1". only once. Yes I know there a mistake I should get it 5 times but this is only a test program. In the Arduino probably missing loop. Using serial communication turn on the diode 3 times, but using bluetooth only executes the first instruction. And nothing returned back to the matlab. I have seen many articles and Bluetooth can work in two modes(Master or Slave) not both at the same time. One mode sends data other receive. Here is probably the problem. I will be glad for any advice and I am sorry for my English.

arduino code

const int ledpin=13;
int recValue;

void setup()
{
Serial.begin(9600);
pinMode(13, OUTPUT);
}

void loop()
{
  if(Serial.available()>0)
  {
    recValue=Serial.read();

    if (recValue == 1) // If use will send value 100 from MATLAB then LED will turn ON
     {
       digitalWrite(ledpin, HIGH);
       }
        if(recValue == 0) // If use will send value 101 from MATLAB then LED will turn OFF
         {
         digitalWrite(ledpin, LOW);
         }
     Serial.print("I received: ");
     Serial.println(recValue, DEC);
      }
    }

Matlab code

b=Bluetooth('HC-05',1);
fopen(b);
for m=1:1:5                                  %I will enter 5 times the number
servalue= input('Enter the value 1 turn led on, 0 turn led off : ');
fprintf(b,servalue);                         
end


out = fscanf(s,'%s');

disp(out);