More MATLAB Trouble

I can receive the characters but its not separating them in servo, pwm and pressure I knew it received them
I am seeing
[Here look at this: characters]
I passed here
"the values should be separated here but nothing
"second value"
"third value"
I passed here

Here is the output after I try it

Hey, lookee here. I got a [7]
Hey, lookee here. I got a - Hey, lookee here. I got a [9]
Hey, lookee here. I got a [6]
Hey, lookee here. I got a [6]
Hey, lookee here. I got a [9]
Hey, lookee here. I got a [,]
Hey, lookee here. I got a [6]
Hey, lookee here. I got a [0]
Hey, lookee here. I got a [,]
Hey, lookee here. I got a [4]
Hey, lookee here. I got a [0]
Hey, lookee here. I got a - Hey, lookee here. I got a [6]
Hey, lookee here. I got a [3]
Hey, lookee here. I got a [5]
Hey, lookee here. I got a [5]
Hey, lookee here. I got a [
]
I passed here:

Hey, lookee here. I got a [
]
I passed here:

I tried printing right after each variable I got this
I am here9I am here96I am here966I am here9669I am here9669«I am here9669«I am here9669««I am here9669««I am here9669««I am here9669««I am here9669««I am here9669««I am here9669««I am here9669««I am here9669««This is PWMThis is PWMThis is PWMThis is
The servo starts to save the values after the second charachter received. PWM and pressure never get assigned any values

Here is the output after I try it

OK. So, we have learned a great deal from this. We know that data is properly being sent to the Arduino, and we know that the Arduino is properly reading the data. We can see that the input stream does contain commas and a carriage return and a line feed.

I can receive the characters but its not separating them in servo, pwm and pressure I knew it received them
I am seeing
[Here look at this: characters]
I passed here
"the values should be separated here but nothing
"second value"
"third value"
I passed here

So, you made a code change to learn this. I can't see what the code looks like, now.

I tried printing right after each variable I got this

More changes. No code posted.

Please post the code you have now. You are very close to getting this to work.

char servo[15], pwm[15], pressure[15];
void setup ()
{
  Serial.begin(9600);
  
  servo[0] = '\0';
  pwm[0] = '\0';
  pressure[0] = '\0';



} /////////////////////////////////////////////////////////////////////////////end of setup
/////////////////////////////////////////////////// here to process incoming serial data after a terminator received



void loop()
{
  char inData[15];
 
  inData[0] = '/0';
  int index = 0;
  int i =0;
  
  int x = 0;


  while((Serial.available() > 0) && (x== 0))  
  {
    char aChar = Serial.read();
    Serial.print("Hey, lookee here. I got a [");
    Serial.print(aChar);
    Serial.println("]");

    if (aChar == '\n'){
      x = 1;
    }
    if(aChar == ',')
    {
      switch (index){
      case 0: 
        for (int k =0; k <15; k++){ ///copy indata to servo
          servo[k] = inData[k];
          Serial.print("I am here");
          Serial.print(servo);
        }
        index =1;
        inData[0] = '\0';
        i =0;
      case 1: 
        for (int k =0; k <15; k++){
          pwm[k] = inData[k];
           Serial.print("This is PWM");
          Serial.print(pwm);
        }
        index = 2;
        inData[0] = '\0';
        i =0;
      case 2: 
        for (int k =0; k <15; k++){
          servo[k] = inData[k];
            Serial.print(" Pressure");
          Serial.print(pwm);
        }
        inData[0] ='\0';
        index =3;
        i = 0;
      default:  
        inData[0] = '\0';
        i = 0;        
      }

    }

    else
    {
      inData[i++] = aChar; // Add the char to the array
    }
    if(x == 1)
    {
      Serial.print("I passed here: ");
      Serial.println();
      Serial.print(servo);
      Serial.println();
      Serial.print(pwm);
      Serial.println();
      Serial.print(pressure);
      Serial.println();
    }  



  }

}
[\code]
I gave up on that and I am using 
This one it works fine and I am able to receive and separate the values. all I need to now is how to pass the float values to the void loop 
I am trying to put them in a float array and return that but I couldn't
[code] 
float servoInt = 0;
  float pwmInt = 0;
  float pressureInt =0;
void setup ()
{
  Serial.begin(9600);
} 

void process_data (char * data)
{

  Serial.println();
  Serial.println (data);
  delay(1000);
}     
void parse_data(char * data)
{ 

  int s = 1;
  int j = 0;
  char value[15];
  for(int k =0 ; k<15;k++){
    value[k]=0;
  }
  String servo;
  String pwm;
  String pressure;

  for(int i = 0; i <100;i++)
  {
    if(data[i] == ',')
    {
      switch(s){
      case 1:
        servo = value;
        servoInt = atof(value);
          Serial.print("servoInt is:");
          Serial.print(servoInt);
        for(int k =0 ; k<15;k++){
          value[k]=0;
        }
        s = 2;
        break;
      case 2:
      pwmInt = atof(value);
      Serial.print(" the actuator angle received in float is ");
      Serial.print(pwmInt);
        pwm = value;
        for(int k =0 ; k<15;k++){
          value[k]=0;
        }
        s = 3;
        break;
      case 3:
        pressureInt = atof(value);
    
        pressure = value;
        for(int k =0 ; k<15;k++){
          value[k]=0;
        }
        s= 4;
        break;  
      }
      j = 0;  
    }
    else{

      value[j] = data[i];
      j++;
    }


  }

 
  Serial.println("I got the final values"); 
  Serial.println(); 
  Serial.print("Servo Angle:");
  Serial.print(servoInt);
  Serial.println();
  Serial.print(" the actuator angle received in float is: ");
  Serial.print(pwmInt);
  Serial.println();
  Serial.print("the presssure received:");
  Serial.print(pressureInt);

  delay(1000); 

}


void loop()
{
  int i= 0;
  static char input_line [50];
  char datas[10];

  static unsigned int input_pos = 0;

  if (Serial.available () > 0) 
  {
    char inByte = Serial.read ();

    switch (inByte)
    {

    case '\n':   
      input_line [input_pos] = 0;  


      process_data (input_line);
      parse_data(input_line);


      input_pos = 0;  
      break;

    case '\r':  


      break;

    default:

      if (input_pos < (50))
        input_line [input_pos++] = inByte;
      break;

    }  // end of switch

  } 
} 
[\code]

[/code]

      pwmInt = atof(value);

What? Perhaps you need to try
int pwmFloat = some nonsense.

Do you think this is better.
I am thinking of changing the whole thing to this algorithm
send firstValue , SecondValue;ThirdValue: /n

read serial
switch inByte
case ,
firstValue = atof(arraychar);
reset (arraychar);

case ';' :
secondValue = atof(arraychar);
reset value;

case ':' :
thirdValue = atof(arrayChar);

default:
inData[pos++] += inByte;

PaulS:

      pwmInt = atof(value);

What? Perhaps you need to try
int pwmFloat = some nonsense.

Well I was using Int earlier thats why the name is pwmInt

Well I was using Int earlier thats why the name is pwmInt

It's not an int now. You can, and should, change the name.

Thank you Paul really thanks for all the guidance you provided
thanks to this forum its really helpful.
I got it with my new algorithm I will post my code for any one who get stuck
I am sending with 3 different delimiter values
the sent data as a string is: "servo,pwm;pressure:\n"

char servo[15], pwm[15], pressure[15];
char inData[15];
int i =0;
float servoFloat = 0;
float pwmFloat = 0;
float pressureFloat =0;
void setup ()
{
  Serial.begin(9600);
  inData[0] = '/0';

  servo[0] = '\0';
  pwm[0] = '\0';
  pressure[0] = '\0';
} 
//****************************************************************************************************************end of setup

void loop()
{

  int x = 0;
  while((Serial.available() > 0) && (x== 0))  
  {
    char aChar = Serial.read();

    switch (aChar){
    case ',': 
        servoFloat =atof(inData);
      inData[0] = '\0';
      i =0;
      break;
    case ';': 
      pwmFloat = atof(inData);
      inData[0] = '\0';
      i =0;
      break;
    case ':': 
    
      pressureFloat = atof(inData);
      inData[0] ='\0';
      i = 0;
      break;
    case'\n':
      x=1;
      break;

    default:  
      inData[i++] = aChar; // Add the char to the array
    }

  }


  if(x == 1)
  {
    Serial.print("I passed here: ");
    Serial.println();
    Serial.print(servoFloat);
    Serial.println();
    Serial.print(pwmFloat);
    Serial.println();
    Serial.print(pressureFloat);
    Serial.println();
  }  



}

[\code]