How do I code to normalize a matrix by dividing each index by the max abs value in the row

 Accepted Answer

A=[2 7;8 10]
out=A/max(abs(A(:)))

2 Comments

Thanks Azzi. That definitely shortened my code and I learned a new command.
But this does not solve the question: "dividing each index by the max abs value in the row".

Sign in to comment.

More Answers (1)

Categories

Tags

Community Treasure Hunt

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

Start Hunting!