I have a matrix with elements both real and complex.I want to find Max value within a column of that matrix ,,ignoring all the complex element in that column.
조회 수: 2 (최근 30일)
이전 댓글 표시
Eg. If in a particular column of matrix suppose elements are ( 1 ,2 ,3+2i) then I want to find the max ignoring (3+2i) means my answer should be 2
댓글 수: 0
답변 (1개)
Image Analyst
2023년 6월 1일
Try this:
v = [1; 2; 3+2i]
goodRows = imag(v) == 0
theMax = max(v(goodRows))
댓글 수: 0
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!