• Stars
    star
    237
  • Rank 169,941 (Top 4 %)
  • Language
    TypeScript
  • License
    MIT License
  • Created over 1 year ago
  • Updated about 1 month ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

This extension provides support for editing MATLAB® code in Visual Studio® Code and includes features such as syntax highlighting, code analysis, navigation support, and more.

MATLAB extension for Visual Studio Code

This extension provides support for editing MATLAB® code in Visual Studio® Code and includes features such as syntax highlighting, code analysis, navigation support, and more.

You can use this extension with or without MATLAB installed on your system. However, to make use of the advanced code-editing features of the extension, you must have MATLAB R2021a or later installed. For more information, see the Get Started section.

For an overview of the major features of this extension, you can watch the Introducing the New MATLAB Extension for Visual Studio Code video.

Installation

You can install the extension from within Visual Studio Code or download it from Visual Studio Code Marketplace. After installing the extension, you might need to configure it to make full use of all the features. For more information, see the Configuration section.

Get Started

To get started using the extension, open any MATLAB code file, or create a new file and set the language to MATLAB.

Basic Features (MATLAB not required)

The extension provides several basic features, regardless of whether you have MATLAB installed on your system. These features include:

  • Syntax highlighting
  • Code snippets
  • Commenting
  • Code folding

MATLAB Extension Demo

Advanced Features (requires MATLAB installed on your system)

If you have MATLAB R2021a or later installed on your system, you have access to an additional set of advanced code-editing features. These features include:

  • Automatic code completion
  • Source code formatting (document formatting)
  • Code navigation
  • Code analysis, such as continuous code checking and automatic fixes
  • Code outline

MATLAB Extension Demo

Configuration

To configure the extension, go to the extension settings and select from the available options.

MATLAB Install Path Setting

If you have MATLAB installed on your system, the extension automatically checks the system path for the location of the MATLAB executable. If the MATLAB executable is not on the system path, you may need to manually set the matlab.installPath setting to the full path of your MATLAB installation. For example, C:\Program Files\MATLAB\R2022b (Windows®), /Applications/MATLAB_R2022b.app (macOS), or /usr/local/MATLAB/R2022b (Linux®).

You can determine the full path of your MATLAB installation by using the matlabroot command in MATLAB.

For example, run the matlabroot command in the MATLAB Command Window.

matlabroot
ans =
    'C:\Program Files\MATLAB\R2022b'

In the extension settings, set the matlab.installPath setting to the value returned by the matlabroot command.

MATLAB Install Path Setting

MATLAB Index Workspace Setting

By default, the extension indexes all the MATLAB code files (.m) in your current workspace. Indexing allows the extension to find and navigate between your MATLAB code files. You can disable indexing to improve the performance of the extension. To disable indexing, set the matlab.indexWorkspace setting to false. Disabling indexing can cause features such as code navigation not to function as expected.

MATLAB Connection Timing Setting

By default, the extension starts MATLAB in the background when you open a MATLAB code file in Visual Studio Code. To control when the extension starts MATLAB, set the matlab.matlabConnectionTiming setting to one of these values:

  • onStart (default) — Start MATLAB as soon as a MATLAB code file is opened.
  • onDemand — Start MATLAB only when needed for a given action.
  • never — Never start MATLAB. Note: Some functionality is available only with MATLAB running in the background.

MATLAB Telemetry Setting

You can help improve the extension by sending user experience information to MathWorks®. By default, the extension sends user experience information to MathWorks. To disable sending information, set the matlab.telemetry setting to false.

For more information, see the MathWorks Privacy Policy.

Troubleshooting

If the MATLAB install path is not properly configured, you get an error when you try to use certain advanced features, such as document formatting and code navigation.

To resolve the error, set the MATLAB install path to the location of the MATLAB executable. For more information, see the Configuration > MATLAB Install Path Setting section.

Contact Us

We encourage all feedback. If you encounter a technical issue or have an enhancement request, create an issue here or contact MathWorks at [email protected].

Release Notes

1.1.0

Release date: 2023-06-5

Added:

  • Document symbol and outline support

Fixed:

  • Code folding no longer matches end when used in strings, comments, and to denote the end of a matrix

1.0.0

Release date: 2023-04-26

  • Initial release.

More Repositories

1

MATLAB-Simulink-Challenge-Project-Hub

This MATLAB and Simulink Challenge Project Hub contains a list of research and design project ideas. These projects will help you gain practical experience and insight into technology trends and industry directions.
MATLAB
1,188
star
2

thingspeak-arduino

ThingSpeak Communication Library for Arduino, ESP8266 and ESP32
C++
438
star
3

awesome-matlab-students

An awesome list of helpful resources for students learning MATLAB & Simulink. List includes tips & tricks, tutorials, videos, cheat sheets, and opportunities to learn MATLAB & Simulink.
MATLAB
298
star
4

jupyter-matlab-proxy

MATLAB Integration for Jupyter enables you to run MATLAB code in Jupyter Notebooks and other Jupyter environments. You can also open MATLAB in a browser directly from your Jupyter environment to use more MATLAB features.
Python
219
star
5

Design-motor-controllers-with-Simscape-Electrical

This repository contains MATLAB and Simulink files used in the "How to design motor controllers using Simscape Electrical" videos.
MATLAB
172
star
6

simulinkDroneReferenceApp

This Simulink Project shows the implementation of a Remotely Piloted Radio-Control fixed-wing aircraft (i.e. Drone, UAV), an autopilot for flight stabilization, and an operator interface to control its trajectory.
C
109
star
7

matlab-with-python

Files demonstrating MATLAB and Python interoperability
Jupyter Notebook
96
star
8

Modeling-TVCd-Rocket-in-Simulink

Code in this repository is discussed in this BPS.Space YouTube video on modeling a thrust vector controlled rocket in Simulink. Thrust Vectoring or Thrust Vector control is the ability of an aircraft or a rocket's propulsion system to manipulate the direction of its thrust to control the rocket or aircrafts attitude or angular velocity.
93
star
9

awesome-matlab-hackathons

This repository is a resource center for hackathon participants! Check out the readme file to find getting started resources and inspiration for your next hack!
89
star
10

MATLAB-language-server

TypeScript
83
star
11

toolboxdesign

Best practices for creating high-quality and user-friendly MATLAB toolboxes, including recommendations for file organization, testing, and releasing the toolbox.
82
star
12

ci-configuration-examples

This repository makes it easy to run your MATLAB tests on some of the most common CI platforms. The configuration files take care of setting up MATLAB and automatically executing your MATLAB tests.
MATLAB
73
star
13

Simscape-Battery-Electric-Vehicle-Model

A Battery Electric Vehicle (BEV) model in Simscape for longitudinal powertrain analysis
HTML
70
star
14

Quadcopter-Drone-Model-Simscape

Quadcopter with multibody, electrical and thermal models follows a path to deliver a package.
MATLAB
68
star
15

AUV-modeling-and-sim

This submission contains the files used in this video on modeling, simulation and control of an Autonomous Underwater vehicle - https://www.mathworks.com/videos/modeling-and-simulation-of-an-autonomous-underwater-vehicle-1586937688878.html. This submission models a 6-DoF autonomous underwater vehicle (AUV) and a position and velocity controller for the AUV. You can switch between low and high fidelity sensor and environment models based on your application needs.
MATLAB
68
star
16

visualization-cheat-sheet

This repo provides a cheat sheet which contains essential tips in creating plots in MATLAB.
64
star
17

msra-walking-robot

Example files for MATLAB and Simulink Robotics Arena walking robot videos.
HTML
63
star
18

matlab-engine-for-python

Python
62
star
19

Battery-Pack-Model-Simscape

Battery pack model for thermal management tasks, with modules of cells in series and parallel.
MATLAB
57
star
20

MATLAB-Live-Task-for-Python

The MATLAB® Live Task for Python® enables you to write and execute Python code directly inside of a MATLAB Live Script.
MATLAB
55
star
21

2D-Lid-Driven-Cavity-Flow-Incompressible-Navier-Stokes-Solver

This repository provides MATLAB code for the lid-driven cavity flow where incompressible Navier Stokes equation is numerically solved using a simple 2nd order finite difference scheme on a staggered grid system.
MATLAB
53
star
22

vehicle-model-predictive-control

This submission contains a model to show the implementation of MPC on a vehicle moving in a US Highway scene.
MATLAB
51
star
23

Simscape-Vehicle-Templates

Set of templates for creating custom vehicle models using Simscape for use within Simulink.
MATLAB
51
star
24

HDL-Coder-Self-Guided-Tutorial

Learn how to deploy an algorithm to an FPGA using MATLAB and Simulink.
MATLAB
45
star
25

jenkins-matlab-plugin

This plugin enables you to run MATLAB® and Simulink® as part of your Jenkins™ build.
Java
44
star
26

Simscape-Multibody-Contact-Forces-Library

Contact force examples and library.
HTML
44
star
27

Simscape-Wind-Turbine

Wind turbine model including blades, nacelle, pitch and yaw actuation, generator and control system.
MATLAB
43
star
28

matlab-proxy

Python® package enables you to open a MATLAB® desktop in a web browser tab.
Python
42
star
29

physionet_ECG_data

This repository contains human electrocardiogram data (ECG) data used in Wavelet Toolbox machine and deep learning examples
42
star
30

MATLAB-Language-grammar

This repository contains a regular expression based language grammar for MATLAB to be used by GitHub Linguist for highlighting MATLAB code on GitHub
MATLAB
42
star
31

Simscape-HEV-Series-Parallel

Model of a parallel-series hybrid-electric vehicle with system-level and detailed variants of electrical system.
MATLAB
37
star
32

Simscape-Hybrid-Electric-Vehicle-Model

A Power-Split Hybrid Electric Vehicle (HEV) model in Simscape
HTML
36
star
33

Industrial-Robots-Simscape

Manipulator and mobile robot models for trajectory planning and actuator analysis.
MATLAB
35
star
34

WindTurbineHighSpeedBearingPrognosis-Data

Data set for Wind Turbine High-Speed Bearing Prognosis example in Predictive Maintenance Toolbox
34
star
35

Fuel-Cell-Vehicle-Model-Simscape

Fuel cell electric vehicle with battery model and cooling system.
MATLAB
34
star
36

Apollo_11_Moon_Landing_-_50th_Anniversary_Model

This example shows how Richard Gran and the other engineers who worked on the Apollo Lunar Module digital autopilot design team could have done it using Simulink®, Stateflow®, Aerospace Blockset™ and Simulink 3D Animation if they had been available in 1961.
MATLAB
33
star
37

how-to-turn-your-script-into-a-simple-app

Demonstration source code for the seminar "How to turn your script into a simple app"
MATLAB
31
star
38

climatedatastore

Climate Data Store Toolbox for MATLAB
MATLAB
30
star
39

quadcopter-simulation-ros-gazebo

Quadcopter control & simulation with ROS, Gazebo and the Robotics System Toolbox
C++
28
star
40

RollingElementBearingFaultDiagnosis-Data

Data set for Rolling Element Bearing Fault Diagnosis example in Predictive Maintenance Toolbox
28
star
41

Simulink-Model-Comparison-for-GitHub-Pull-Requests

Files demonstrating how to diff Simulink models and attach reports to pull requests
MATLAB
28
star
42

OpenTrafficLab

OpenTrafficLab is a MATLAB environment capable of simulating simple traffic scenarios with modular vehicle and junction controllers.
MATLAB
27
star
43

Quantum-Computing-MATLAB

MATLAB examples, functions and otherwise helpful material using the MATLAB Support Package for Quantum Computing
27
star
44

FPGA-Adaptive-Beamforming-and-Radar-Examples

This repository contains FPGA/HDL demonstrations several beamforming and radar designs. Simulink models and MATLAB reference code are provided to showcase high-level simulation and HDL designs of various radar and array processing algorithms.
MATLAB
26
star
45

mpc_implementation_example

当サンプルモデルは、モデル予測制御(MPC)の設計と実装のワークフローを分かりやすく紹介するための資料です。 設計後、コード生成を行い、マイクロコントローラに実装するまでの流れを詳しくまとめています。
MATLAB
25
star
46

Mars-Rover-Terrain-Simscape

Six-wheeled electrically-driven rover that navigates uneven terrain to retrieve a sample.
MATLAB
24
star
47

Simscape-Triplex-Pump

Predictive maintenance algorithm developed using digital twin of hydraulic pump modeled in Simscape
MATLAB
24
star
48

Simscape-Robot-4Legs

Quadruped robot model with electrical actuation, including gait analysis and design workflow.
HTML
24
star
49

buildroot

This buildroot fork contains customized recipes for generating AMD-Xilinx SoC and Intel SoC embedded Linux images for use with MathWorks tools.
C
23
star
50

widgets-toolbox

Additional app building components to efficiently develop advanced user interfaces in MATLAB
MATLAB
22
star
51

Simscape-Essentials-for-Automotive-Student-Teams

The submission introduces a set of models to get the automotive student teams started with physical modeling using Simscape™.
MATLAB
22
star
52

Enigma

MATLAB App for simulating the Enigma encryption machine
MATLAB
21
star
53

deep-traffic-lab

MATLAB
21
star
54

thingspeak-particle

ThingSpeak Communication Library for Particle
C++
21
star
55

Lunar-Mission-Trajectory-Inspired-by-Artemis-I-Mission

Inspired by Orion and the Artemis I mission, this example simulates a lunar mission trajectory in MATLAB and Simulink.
20
star
56

vehicle-modeling

This submission contains a set of models created with Simulink and Powertrain Blockset.
20
star
57

vehicle-pure-pursuit

This submission contains a set of models to show the implementation of a Pure Pursuit controller on a vehicle under different scenarios. About the models: These models show a workflow to implement a Pure Pursuit controller to track a planned path. Steps below describe the workflow: 1. Generating waypoints 2. Formulating required steering angle for lateral control 3. Implementing a longitudinal controller to track the path at higher velocity 4. Visualizing vehicle final path in Bird's-Eye Scope and a 3D simulation environment
MATLAB
19
star
58

Truck-Platooning

Simulink Reference example for modeling smart trucks with the intelligence to form a platoon based on certain criteria.
MATLAB
18
star
59

xilinx-linux

This repository contains Embedded Linux kernel source code for Xilinx devices.
C
17
star
60

Expo-2022-Cleaning-and-Preparing-Time-Series-Data

Contents for "Cleaning and Preparing Time Series Data" talk (MATLAB Expo 2022)
MATLAB
17
star
61

deep-learning-for-time-series-data

The examples showcase two ways of using deep learning for classifying time-series data, i.e. ECG data. The first way is using continuous wavelet transform and transfer learning, whereas the second way is using Wavelet Scattering and LSTMs. The explanations of the code are in Chinese. The used data set can be download on:https://github.com/mathworks/physionet_ECG_data/
17
star
62

Call-Simulink-from-Python

Examples to show the two options to simulate a Simulink model from Python
MATLAB
16
star
63

Climate-IAM-Explorer

MATLAB
16
star
64

model-based-design-dc-dc-converter

Model-Based Design of a DCDC Converter using Simulink, Simscape and Stateflow
MATLAB
16
star
65

build-glibc-bz-19329-patch

This repository provides a Dockerfile and build instructions to apply patch BZ-19329 to glibc
Shell
16
star
66

Awesome-MATLAB-Quant-Finance-

Discover how to leverage MATLAB for quantitative finance modeling
16
star
67

student-competition-code-generation-training

Files for the MATLAB & Simulink Racing Lounge code generation tutorials
C
15
star
68

dotenv-for-MATLAB

Load environment variables from a .env file.
MATLAB
15
star
69

Integrate_Python_code_with_Simulink

MATLAB
14
star
70

FOC-of-PMSM

MATLAB
14
star
71

penrose-tiling

MATLAB functions for Penrose tiling
MATLAB
14
star
72

OpenTelemetry-MATLAB

MATLAB interface to OpenTelemetry
MATLAB
14
star
73

jupyter-matlab-vnc-proxy

Jupyter Integration for MATLAB using VNC
HTML
14
star
74

vehicle-stanley-controller

The submission contains a model to show the implementation of Stanley controller on a vehicle moving in a scene.
MATLAB
14
star
75

matlab-azure-devops-extension

Continuous Integration with MATLAB on Azure DevOps
TypeScript
14
star
76

WordPress_Publishing_Tool

This MATLAB® App provides a fast and easy way for users to publish their MATLAB® live scripts as blog posts to their WordPress sites. What the users type in live script is what the users will see in WordPress.
MATLAB
14
star
77

Simple-Heat-Equation-solver

Simple Heat Equation solver using finite difference method
MATLAB
13
star
78

Time-Series-Forecasting-Simulink

This content shows how to implement time series models provided by Deep Learning Toolbox and Econometrics Toolbox on Simulink model and to update them and forecast value at next time step recursively.
MATLAB
13
star
79

Reinforcement-Learning-Inverted-Pendulum-with-QUBE-Servo2

This is a demo model for Reinforcement Learning Control Design. After designing agent, it is deployed to Raspberry Pi and run real-time hardware.
MATLAB
13
star
80

noaa

Access National Oceanic and Atmospheric Administration (NOAA) Data from MATLAB
MATLAB
13
star
81

SimulinkCoSimulationExample

Examples of Co-Simulation with Simulink
C++
12
star
82

llfs

Low Level File System C++ Library
C++
12
star
83

Fast-Poisson-Equation-Solver-using-DCT

Fast Poisson Equation Solver using Discrete Cosine Transform
MATLAB
11
star
84

robust-matlab-2018

As the size and complexity of your MATLAB® application increases, you want to make sure to structure software projects well, ensuring users can run code without encountering unexpected behaviour or errors, for example. In this talk, you will learn about relevant advanced MATLAB software development capabilities, including error handling, object-oriented programming (OOP), unit testing, version control, and change tracking.
HTML
11
star
85

Simscape-Air-Taxi

Electric and hybrid electric aircraft models for component sizing
MATLAB
11
star
86

Modeling_a_Hybrid_Microgrid

11
star
87

Message-De-Serializer-for-ROS

This project relies on ROS Toolbox functionality to provide basic integration of Simulink® targets, with focus on Simulink Real-Time™ and Speedgoat®, into ROS/ROS2 networks via message serialization.
MATLAB
11
star
88

data-science-predict-weather-events

Explore weather event data and use machine learning to predict the damage costs of storm events based on location, time of year, and type of event
MATLAB
11
star
89

pmsm-drive-optimization

Motor Efficiency Improvements With Optimized Control Parameters
HTML
11
star
90

coder-swig

Examples showing how to use SWIG to wrap MATLAB Coder generated C and C++ code for other languages
MATLAB
11
star
91

Continuous-Integration-Verification-Simulink-Models

This is the example project that is referenced in the Technical Article: Continuous Integration for Verification of Simulink Models. Model-Based Design is used with continuous integration with Jenkins to perform requirements-based testing on an automotive lane-following system.
11
star
92

udacity-self-driving-data-subset

Subset of Udacity Self-Driving Car dataset
10
star
93

Simscape-Medical-Ventilator

Positive-pressure medical ventilator system using Simscape™
MATLAB
10
star
94

requirements-based-testing-example

MATLAB
10
star
95

Simple-Wave-Equation-solver

An example of solving a wave equation using finite difference
10
star
96

Simscape-Multibody-Multiphysics-Library

Extend Simscape Multibody models with physical effects spanning multiple physical domains.
HTML
10
star
97

xilinx-uboot

This repository contains source code for Universal boot loader This repository contains source code for Universal boot loader for use with Xilinx devices.
C
10
star
98

deep-learning-workshop

MATLAB
10
star
99

Simscape-Tutorial-Exercises

Simscape tutorial exercises from hands-on workshop events.
HTML
10
star
100

matlab-codecov-example

Use MATLAB with Codecov
MATLAB
10
star