how to make cell2mat for many column to one vector ?
이전 댓글 표시
i have a cell like this image

i want to get the maximum value from valeu of column 2 to 5. when i using cell2mat function, i get the error. so, how to convert the value of column 2 to 5 to be vector so i can get the maximum value ? thanks
채택된 답변
추가 답변 (1개)
Image Analyst
2016년 4월 24일
Did you try something like this
col5 = nilai{:, 5};
magCol5 = abs(col5);
[maxValue, indexOfMax] = max(magCol5)
댓글 수: 5
ElizabethR
2016년 4월 24일
Image Analyst
2016년 4월 24일
You just don't have enough deciaml places to see that it's slightly different. Try
format long g
and then look and you'll see it's slightly longer than the real-only part of the number.
ElizabethR
2016년 4월 25일
Image Analyst
2016년 4월 25일
Just put it as a line in your program, or type it at the prompt in the command window.
ElizabethR
2016년 4월 26일
편집: ElizabethR
2016년 4월 26일
카테고리
도움말 센터 및 File Exchange에서 Data Type Conversion에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
