Setting up MATLAB ================= This page is for **users who do not already have MATLAB or the required toolboxes installed**. This guide will walk you through the process of setting up MATLAB and downloading toolboxes required for our pipeline as add-ons. ========================= 1. Create a free Mathworks account: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - You will need a free Mathworks account to conveniently install MATLAB toolboxes that MEA-NAP requires. - If you do not currently have a Mathworks account, go to the [MathWorks website](https://www.mathworks.com/) and create one. 2. Download MATLAB: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - For people using institutional licenses: - Please follow the instructions that your institution has provided for MATLAB installation. - For individual users: - Log in to your MathWorks account and download the MATLAB version installer suitable for your operating system (Windows, macOS, or Linux). - Follow the installation instructions on website to complete the setup. 3. Launch MATLAB: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - Once MATLAB is installed, launch the application. - If you are launching MATLAB for the first time, you will encounter the following - Activation and License Agreement: MATLAB will prompt you to activate your license or provide a license file if you have not already done so. You'll need a valid license to use MATLAB. You will also need to accept the MathWorks License Agreement. 4. Access the add-ons menu: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - Click on the **Home** tab in MATLAB to access the main menu. - Locate and click on the **Add-Ons** dropdown menu. .. image:: imgs/matlab_home_menu.png :width: 800 :align: center :alt: Home tab in MATLAB. Includes Add-Ons dropdown menu on **far right**. .. raw:: html
5. Browse available add-ons: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. image:: imgs/matlab_addon_dropdown_menu.png :width: 200 :align: center :alt: Add-ons dropdown menu .. raw:: html
- In the **Add-Ons** menu, you will find options to browse, install, and manage add-ons. - Click **Get Add-Ons** to access the MATLAB Add-On Explorer. 6. Search for and install toolboxes: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - In the Add-On Explorer, you can search for specific toolboxes by entering keywords or browse the available categories. - Search for and install the following toolboxes: - Signal Processing Toolbox - Statistics and Machine Learning Toolbox - Parallel Computing Toolbox - Wavelet Toolbox - Curve Fitting Toolbox (for the calcium imaging pipeline) - You will also need the Brain Connectivity Toolbox, which cannot be installed through the Add-On Explorer: - This toolbox is found in the **MEA-NAP folder that you will download during step 1 of "Setting Up MEA-NAP."** 7. Access installed toolboxes: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - Once the installation is complete, you can access the newly installed toolbox functions in your MATLAB environment. Congratulations! You have successfully set up MATLAB and downloaded the required toolboxes to extend MATLAB's functionality. Proceed to **"Setting up MEA-NAP."** 8. Notes for users of older macOS versions: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - If you are using an older version of macOS, you may encounter issues with XCode, Apple's integrated development environment that integrates a C/C++ compiler crucial for MEA-NAP's downstream data analysis. - Specifically, you may encounter the following pop-up window: .. image:: imgs/mexmaci64_error.png :width: 200 :align: center :alt: Add-ons dropdown menu .. raw:: html
- If you encounter this window, complete the following steps: 1. Click 'Cancel' 2. Open System Settings on your macOS device 3. Navigate to 'Security & Privacy' 4. Scroll down and click 'Allow Anyway' to enable the XCode command line tools to run on your device 5. Repeat steps 1-4 whenever you restart your macOS device and encounter the pop-up window again