Relative Angle Matrix (RAM)

Relative Angle Matrix (RAM): an effective image representation and feature extraction method for classification

You are now following this Submission

Relative Angle Matrix (RAM) is a method for transforming one-dimensional time series data into two-dimensional image representations, and it is simple yet effective. It converts the one-dimensional time series into two-dimensional images by calculating the angles between multiple vectors and their central vector, and then obtaining the differences between any two angles. The resulting two-dimensional images can extract hidden local features from the original data. This method is also an efficient feature extraction technique that can be used for classification. Compared to Gramian Angular Field (GAF) and Markov Transition Field (MTF), the features extracted by RAM can significantly improve classification accuracy when applied to classifiers such as Convolutional Neural Networks (CNNs).
A description of RAM can be found in: Wang, L., & Zhao, W. (2025). An ensemble deep learning network based on 2D convolutional neural network and 1D LSTM with self-attention for bearing fault diagnosis. Applied Soft Computing, 172, 112889.

Cite As

W. Zhao (2026). Relative Angle Matrix (RAM) (https://au.mathworks.com/matlabcentral/fileexchange/180197-relative-angle-matrix-ram), MATLAB Central File Exchange. Retrieved .

General Information

MATLAB Release Compatibility

  • Compatible with any release

Platform Compatibility

  • Windows
  • macOS
  • Linux
Version Published Release Notes Action
1.0.1

Modify text.

1.0.0