about receiving float on matlab from ATmega32 Avr
i found the solution for this problem, i set a header before sending the data from ATmega32,and on Matlab i check the frame ,if it received correctly,i receive the data

//ATmega32 code
    float x =215.5;
    unsigned char *ptrx;
    int main(void)
    {   usart_init();
        //data.fo=12.85;


        ptrx=( unsigned char *) &amp;x;
          while(1)
       {
        uart_send(0xAA);//equals to 170 
        for(int i=0;i&lt;4;i++){
        uart_send(*(ptrx+i));}

        x++;}}
    //on Matlab
    s=serial('COM1','BaudRate',9600);
    fopen(s);
     i=1;
    while i&lt;1000
        header =fread(s,1,'uint8');

        if header==170//equal to 0xAA

     out=fread(s,1,'float');
    data(i)=out;

     i=i+1;
        end
     end
    fclose(s);