how to display in one variable the max of each one of two arrays?
조회 수: 1 (최근 30일)
이전 댓글 표시
a=[5 10 15]
b=[20 25 30]
c= ?
댓글 수: 0
채택된 답변
추가 답변 (1개)
Star Strider
2016년 9월 17일
Concatenate the vectors inside the max function call:
a = [5 10 15];
b = [20 25 30];
c = max([a; b], [], 2)
c =
15
30
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!