How can I receive sensor data from Arduino/ESP32 to MATLAB?

I’m doing a final project for my school using two sensor that connected to ESP32 as a microcontroller and access point. I want to send the sensor reading from ESP32 through TCP/IP Protocol and receive it in MATLAB. The problem is I don’t know how, like I don’t even have the code that I’ve been working on, and I can’t find any reference that help me through this problem. When I click run on my matlab code, the ESP32 detected a client, but the readings don’t show up. I’m using a randomSeed as the sensor reading for now. Anyone can help me?

This is the Arduino code:

#include <WiFi.h>
#include <WiFiClient.h>
#include <WiFiAP.h>

const char *ssid = "ESP32 AP";
const char *password = "";

WiFiServer server(80);

//float emg1 = 34
//float emg2 = 35

unsigned long to=0;

void setup() {

  Serial.begin(115200);
  Serial.println();
  Serial.println("Configuring access point...");

  // You can remove the password parameter if you want the AP to be open.
  WiFi.softAP(ssid);
  Serial.print("AP IP address: ");
  Serial.println(WiFi.softAPIP());
  server.begin();

  Serial.println("Server started");

  randomSeed(analogRead(34));
}

void loop() {
  WiFiClient client = server.available();  

  if (client) {                             
    Serial.println("New Client!");         
    //String currentLine = "";               
    while (client.connected()) {           
      if (client.available()) {
        //char c=client.read();
        //if(c != 'stop'){
          //while(micros()>to+1000){
            //to=micros();
            int val1 = random(0,50);
            int val2 = random(51,100);
            Serial.print("val1 = ");
            Serial.print(val1);
            client.print(val1);
            Serial.print(" val2 = ");
            Serial.println(val2);
          //}
        //}
      }
    }
  }
}

This is the Matlab code:

s=tcpip('192.168.4.1',80,'NetworkRole','client')
fopen(s);
data=fread(s);