I assume you chose direct connection option for network configuration. To connect to your Raspberry Pi using a different computer:
1. Connect an Ethernet cable between your host computer and the Raspberry Pi. 2. Power on your Raspberry Pi 3. Open Network and Sharing center and identify the network connection for Raspberry Pi. Click on the network connection (such as Local Areas Connection 11). This will open a window. On this window click "Properties". Choose "Internet Protocol Version 4 (TCP/IPv4)". Click on "Properties". On the window that opens check the Following options:
Obtain IP address automatically Obtain DNS server automatically
4. Wait about 1 minute and then ping your Raspberry Pi from the DOS command line:
> ping 169.254.0.2
This should return successful. Then connect to your Raspberry Pi from MATLAB.
Make sure that your network card on the laptop / workstation