max of two arrays one being empty returns the empty array

4 views (last 30 days)
i need to find maximum of elements of two arrays. if one is empty, Max function always returns the empty one. For ex: A=[]; B=[5]; max(A,B) returns [].
How to solve the problem ?

Answers (0)

Categories

Find more on Multidimensional Arrays in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!