axisL2norm

Normalize a tensor along a given dimension.

You are now following this Submission

Normalize an N-dimensional tensor along a given axis using the L2 (euclidean) norm.

A simple example where N=2 that illustrates what this means:

Input: [ 3 5 ]
[ 4 12]

Let's say we want to normalize along the 2nd dimension.

Normalization = [ 5 13 ]

Normalized Output = [ 3/5 5/13 ]
[ 4/5 12/13]

Cite As

Barun Singh (2026). axisL2norm (https://www.mathworks.com/matlabcentral/fileexchange/7958-axisl2norm), MATLAB Central File Exchange. Retrieved .

Categories

Find more on Sparse Matrices in Help Center and MATLAB Answers

General Information

MATLAB Release Compatibility

  • Compatible with any release

Platform Compatibility

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