MATLAB Examples
The comparison of three DC motor control techniques for tracking setpoint commands and reducing sensitivity to load disturbances:
Acquire and display data from an accelerometer attached to a vehicle driven under uneven road conditions.
Measure signal similarities. It will help you answer questions such as: How do I compare signals with different lengths or different sampling rates? How do I find if there is a signal or just noise in a measurement? Are two signals related? How to measure a delay between two signals (and how do I align them)? How do I compare the frequency content of two signals?
Several image enhancement approaches. Three functions are particularly suitable for contrast enhancement: imadjust , histeq , and adapthisteq . This example compares their use for enhancing grayscale and truecolor images.
Plot the time and frequency responses of SISO and MIMO linear systems.
Design lowpass filters. The example highlights some of the most commonly used command-line tools in the DSP System Toolbox. Alternatively, you can use the Filter Builder app to implement
Lowpass filter an ECG signal that contains high frequency noise.
Simulate the working of an automatic climate control system in a car using Simulink® and Stateflow®. You can enter a temperature value you would like the air in the car to reach by double
Use System objects to do streaming signal processing in MATLAB. The signals are read in and processed frame by frame (or block by block) in each processing loop. You can control the size of each
The recommended workflow for generating C code from a MATLAB function using the 'codegen' command. These are the steps: 1. Add the %#codegen directive to the MATLAB function to indicate that
Use an extended Kalman filter with the MATLAB® Function block in Simulink® to estimate an aircraft's position from radar measurements. The filter implementation is found in the MATLAB
This example was authored by the MathWorks community.
Original reference to the cell list algorithm: Heinz, T.N. & Hunenberger, P.H. "A fast pairlist-construction algorithm for molecular simulations under periodic boundary conditions." J
Model an automotive drivetrain with Simulink®. Stateflow® enhances the Simulink model with its representation of the transmission control logic. Simulink provides a powerful
Model a conceptual air traffic control (ATC) radar simulation based on the radar range equation.
Use anti-windup schemes to prevent integration wind-up in PID controllers when the actuators are saturated. We use the PID Controller block in Simulink® which features two built-in
To create two-dimensional line plots, use the plot function. For example, plot the value of the sine function from 0 to 2\pi :
Do some basic matrix manipulations in MATLAB®.
Choose your country to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a location from the following list:
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.