필터 지우기
필터 지우기

how to display in one variable the max of each one of two arrays?

조회 수: 2 (최근 30일)
a=[5 10 15]
b=[20 25 30]
c= ?

채택된 답변

James Tursa
James Tursa 2016년 9월 17일
c = [max(a) max(b)];

추가 답변 (1개)

Star Strider
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

카테고리

Help CenterFile Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by