Write a program that creates a vector, v, containing the absolute value of the difference between the maximum and minimum values in each row of A. A =[66 94 75 18

답변 (1개)

A =[66 94 75 18
4 68 40 71
85 76 66 4] ;
iwant = max(A,[],2)-min(A,[],2)
iwant = 3×1
76 67 81

댓글 수: 2

REad about the function min and max, you can proivde the dimension across which you seek the minimum and maximum.

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터File Exchange에서 Logical에 대해 자세히 알아보기

제품

릴리스

R2018a

태그

질문:

2022년 2월 17일

댓글:

2022년 2월 17일

Community Treasure Hunt

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

Start Hunting!

Translated by