MATLAB: Is the “raspi” command broken after setting up environment variables for ARM library support

armEmbedded Coderenvironmentpackagerapsisoftwareuserland

I am trying to compile deep learning networks on my raspberry Pi 2B. I followed the steps in the link below to set up the environment variable for ARM library:
But now when I am trying to run the following command :
>> r = raspi(ipaddress,'username',password);
I get this error :
### Updating Raspberry Pi I/O server…
### Connecting to board…
### Connected to 10.3.35.110…
Error using CodeGenerationForMobileNetv2NetworksOnARMCPUsExample (line 72)
userland software package(<https://github.com/raspberrypi/userland>) is not found in /opt/userland/ directory on the Raspberry Pi board.
Raspberry Pi I/O server requires userland GIT reporitory be installed in /opt/userland folder.Follow the instructions below to install userland:
1. Make sure that your Raspberry Pi board is connected to Internet
2. Login to your Raspberry Pi and execute the following commands on a terminal:
$ sudo rm -fr /opt/userland
$ cd /opt; sudo git clone git://<http://github.com/raspberrypi/userland.git github.com/raspberrypi/userland.git>
$ cd /opt/userland; sudo git pull origin
$ cd /opt/userland; sudo ./buildme
$ sudo ldconfig
The 'userland' folder is present in the correct location, and I already have run 'sudo ./buildme' and 'sudo ldconfig' . Unfortunately the error is still present.
Why did trying to set up environment variables for ARM library support break the 'raspi' function?

Best Answer

The common workflow to add environment variables on a Raspberry Pi would be updating the '/etc/environment' file.
To edit this file, please follow these instructions.
1. Revert the '.bashrc' changes.
2. Execute the following commands in MATLAB to open a shell on your Raspberry Pi
>> r = raspberrypi('10.3.35.110','pi','raspberry')
>> r.openShell
3. In the shell opened execute the following command
-$ sudo nano /etc/environment
4. Add the below line in the file opened (no need to add PATH or LD_LIBRARY_PATH)
ARM_COMPUTELIB=/home/pi/ComputeLibrary
5. Reboot the Raspberry Pi.