• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer
  • Advertise
  • Subscribe

Test & Measurement Tips

Oscilloscopes, electronics engineering industry news, how-to EE articles and electronics resources

  • Oscilloscopes
    • Analog Oscilloscope
    • Digital Oscilloscope
    • Handheld Oscilloscope
    • Mixed-signal Oscilloscope
    • PC-based Oscilloscopes – PCO
  • Design
  • Calibration
  • Meters & Testers
  • Test Equipment
  • Learn
    • eBooks/Tech Tips
    • FAQs
    • EE Training Days
    • Learning Center
    • Tech Toolboxes
    • Webinars & Digital Events
  • Video
    • EE Videos
    • Teardown Videos
  • Resources
    • Design Guide Library
    • Digital Issues
    • Engineering Diversity & Inclusion
    • Leap Awards
    • White Papers
  • Subscribe
You are here: Home / FAQ / Making measurements with Matlab

Making measurements with Matlab

July 23, 2018 By David Herres 1 Comment

Matlab was released in 1984 by Mathworks, an American privately-held corporation whose other major product is the closely-related Simulink. Additionally, Mathworks offers close to 100 other programs, such as Polyspace, SimEvents and Stateflow.

The Mathworks logo is based on a fundamental model that describes how a disturbance travels through matter. When t is time and X and Y are spatial coordinates with the units set so that the propagation speed is one, the amplitude of the wave satisfies a partial differential equation.

Matlab’s main focus is numerical computing, including matrix and algorithm operations, plotting of data and functions and creation of user interfaces. It is capable of interacting with outside programming languages, such as C, C++, C#, Java, Fortran and Python.

One factor that accounts for Matlab’s phenomenal success and enduring wide use among researchers, engineers, and advanced students is its comprehensive and well-designed documentation. Mathworks offers on its website free-of-charge a wide variety of tutorials and training sessions.

The best introduction is Matlab’s Onramp, a free, two-hour online overview course that introduces new users to the Matlab language and shows some real-world examples. The course starts with fundamental Matlab commands, then shows how to import and display data and introduces typical projects for putting this knowledge to work. A user-oriented project that concludes the course involves analyzing light from a star to see whether it is moving towards or away from the earth.

Most of the course interacts with a web-based version of Matlab, in contrast to the desktop versions, which, despite its different superficial appearance, is essentially written in the same Matlab language. The course is divided into simple units that build the user’s knowledge base. After viewing introductory material, the user executes commands by entering them into the command window following the Matlab prompt (>>) and pressing Enter/Return. A star (*) denotes multiplication of scalar numbers.

Matlab focuses on deep learning, computer vision, signal processing, quantitative finance and risk management, robotics and control systems. Deep learning pertains to training networks. A key component in that endeavor is image recognition. Other areas are speech recognition and text analytics. Matlab’s deep learning is interactive with industry-wide products such as Caffee and Tensor Flow-Keras.

The key to training a model is to have access to large databases. In looking at images, for example, the first task is to isolate the object of interest from the background.

Matlab makes it feasible to run through an entire video and separate out a group of pixels or area of the picture. Then, the network can be trained to retain and correlate this information on a case-specific basis. Moreover, Matlab permits the user to monitor the progress of network training to see if it is moving rapidly in the right direction.

Speech recognition and text analytics are important parts of network training. To this end, deep learning interacts with Python, Java, .net, C and C++. Computer vision in Matlab presupposes algorithm development to deal with diverse situations that constantly arise. Matlab and its associated program, Simulink, begin by acquiring the requisite graphics and video from imaging hardware. Video and images may then be used for visualization and manipulation by means of graphical tools that are provided within these programs. Additionally, there are libraries of standard algorithms that enable users to implement designs in embedded hardware.

Signals from a variety of sources may be acquired, measured and analyzed, making use of Matlab and Simulink signal processing resources. These tools allow users to first preprocess and filter signals, then to analyze them for use with data analytics and machine learning. Ultimate goals are to analyze trends and to perceive patterns in signals at the outputs of connected instrumentation.

Matlab and Simulink also are likely to play a central role in robotics with functions that can connect to outside robot operating systems independent of hardware details. This facility works with well-known equipment such as Arduino and Raspberry Pi as well as with older robotics having legacy code.

matlab screenshots
Among its capabilities, Matlab can access DAQ hardware subsystems such as analog input and output, digital I/O, and counter/timers.

Matlab helps engineers design and deploy control systems at all stages of development, as in plant modeling and automatic code generation. These tools are quite flexible and able to solve wide-ranging control problems. An example is Arduino support in Matlab. Using the Matlab package for Arduino hardware, Matlab interactively communicates with the board, which can then perform a variety of functions including acquiring analog and digital signals, controlling other hardware using digital and pulse-width modulated signals, driving dc, stepper and servo motors; accessing peripheral devices and sensors via I2C and SPIB or Wi-Fi to communicate with an Arduino board; and building interfaces with hardware and software libraries.

Matlab is a high-level interpreted language. Without delay, the user accesses I/O instructions with no compilation required. There are numerous math, engineering and plotting capabilities so that data from the Arduino is available for timely analysis and display.

Matlab’s Instrument Control Toolbox facilitates control and communication with test and measurement instruments such as oscilloscopes, power supplies, signal analyzers, function generators and analytical instruments. VISA instrument drivers, for example IVI and VXI plug&play, are first required, or alternately text-based SCPI commands over communications protocols such as GPIB, TCP/IP and UDP. Another approach is to control and acquire data from test instrumentation without benefit of code.

Matlab’s Instrument Control Toolbox generates data that may be sent out to an instrument, or it can import data into Matlab, which then subjects it to analysis and display. Tests can be automated, hardware designs verified and test systems built, incorporating LXI, PXI and AXle standards.

Other computers can be remotely connected to Matlab by means of TCP/IP, UDP, I2C, SPI, Modbus and Bluetooth serial protocols. In all cases, the Mathworks Instrument Control Toolbox requires prior installation of Matlab. The Matlab Instrument Control Toolbox can acquire and control data from an oscilloscope to simplify data analysis and create automated tests. It is also easy to make graphical interfaces.

Referring to the oscilloscope’s operating and programming manuals, data can be acquired and controlled using GPIB, serial, TCP/IP, UDP and VISA interfaces. Matlab’s Instrument Control Toolbax provides connectivity via Matlab Instrument Drivers, IVI and VXIplug&play. Native Matlab instrument drivers to not require the installation of additional drivers. They work on Windows, Linux or Mac operating systems.

IVI instrument drivers are often included when you purchase an oscilloscope, or they are available on the manufacturer’s website. VXIplug&play similarly often ships with the instrument or is available online.

To see how to connect an oscilloscope that is running the Matlab program, first display a waveform in the oscilloscope, for example a 5-V peak-to-peak square wave centered on the X and Y axes. To bring the waveform information into Matlab, install VISA drivers obtained from the Tektronix or National Instruments website. The oscilloscope-computer hardware connection can be over USB, RS-232, GPIB or Ethernet.

In the computer, from the Matlab program, access Test and Measurement Tool, which is included in the Instrument Control Toolbox. Expand the Hardware section to reveal Interface Options. Select the interface that has been used to connect the oscilloscope to the computer, in this example USB.
The Instrument Control Toolbox permits the user to search for available hardware, configure instrument settings, read data from the instrument and save a log of the session as an M-file. To navigate the tool, click on the Help tab, which guides you through the process of connecting to the instrument. The Help section updates with specific steps that pertain to chosen options.

Under the driver that is selected, in Instrument Functions, select Read Waveform. For Waveform Object, select Waveform 1. For Input Argument(s), type in Channel 1. For Output argument(s), type in X,Y. Then show Help, if needed, and Execute.

The Response Window shows that the function has been completed successfully. Below, click on Export. The Data Exporter Window permits the user to select a destination, such as MATLAB Workspace. In the Command Window, enter plot (X, Y). The 5-V peak-to-peak square wave is now displayed in Matlab and shown in the computer.

You may also like:


  • Test and measurement with LabVIEW

  • A DIY vector network analyzer? Yes, there is such a…
  • simplified AWG block diagram
    Simplifying signal generation using arbitrary waveform generators

  • DAQ Series: What is a Data Acquisition System (DAQ)?

Filed Under: Design, FAQ, Featured, Test Equipment Tagged With: FAQ, mathworks

Reader Interactions

Comments

  1. opera support number says

    August 1, 2018 at 2:04 pm

    Using the Matlab for a long time and I must say that it a lot of features and supports a lot of coding formats. Basically, it is all in one compiler

    Log in to Reply

Leave a Reply Cancel reply

You must be logged in to post a comment.

Primary Sidebar

Featured Contributions

Why engineers need IC ESD and TLP data

Verify, test, and troubleshoot 5G Wi-Fi FWA gateways

How to build and manage a top-notch test team

How to use remote sensing for DC programmable power supplies

The factors of accurate measurements

More Featured Contributions

EE TECH TOOLBOX

“ee
Tech Toolbox: Internet of Things
Explore practical strategies for minimizing attack surfaces, managing memory efficiently, and securing firmware. Download now to ensure your IoT implementations remain secure, efficient, and future-ready.

EE TRAINING CENTER

EE Learning Center

EE ENGINEERING TRAINING DAYS

engineering
“test
EXPAND YOUR KNOWLEDGE AND STAY CONNECTED
Get the latest info on technologies, tools and strategies for EE professionals.
“bills

RSS Current EDABoard.com discussions

  • Is it possible to improve accuarcy of ad633
  • 12VAC to 12VDC 5A on 250ft 12AWG
  • Battery sensing circuitry for coin cell application
  • Copper Pour Support in Altium Softwarez
  • Input impedance matching network

RSS Current Electro-Tech-Online.com Discussions

  • Chinese Tarrifs – 104%!?!
  • An Update On Tarrifs
  • Tariff Updates from JLCPCB as of Today
  • Solar lighting motion detector
  • Telegram Based Alarm - Sensor cable protection
Search Millions of Parts from Thousands of Suppliers.

Search Now!
design fast globle

Footer

EE World Online Network

  • 5G Technology World
  • EE World Online
  • Engineers Garage
  • Analog IC Tips
  • Battery Power Tips
  • Connector Tips
  • DesignFast
  • EDA Board Forums
  • Electro Tech Online Forums
  • EV Engineering
  • Microcontroller Tips
  • Power Electronic Tips
  • Sensor Tips

Test & Measurement Tips

  • Subscribe to our newsletter
  • Advertise with us
  • Contact us
  • About us

Copyright © 2025 · WTWH Media LLC and its licensors. All rights reserved.
The material on this site may not be reproduced, distributed, transmitted, cached or otherwise used, except with the prior written permission of WTWH Media.

Privacy Policy