Create unit vector for every vector in 3d array

15 views (last 30 days)
I have 3x1x541 array, and I would like to turn each 3x1 in the array into a unit vector. What would be the quickest way to do this?

Accepted Answer

Matt J
Matt J on 24 Mar 2023
normalize(yourArray,1,'n')

More Answers (0)

Categories

Find more on Data Types in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!