how to make cell2mat for many column to one vector ?

5 views (last 30 days)
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
  3 Comments
Stephen23
Stephen23 on 25 Apr 2016
Edited: Stephen23 on 25 Apr 2016
@eliz: instead of asking random strangers why not just simply read the MATLAB documentation max, and see what it says about complex numbers. The documentation is great: it tells us how MATLAB works.

Sign in to comment.

Accepted Answer

Jan
Jan on 24 Apr 2016
Perhaps something like:
V = [b{:, 2:5}]
  4 Comments
ElizabethR
ElizabethR on 26 Apr 2016
@Jan Simon how to get all value only from column 2 ?? thanks

Sign in to comment.

More Answers (1)

Image Analyst
Image Analyst on 24 Apr 2016
Did you try something like this
col5 = nilai{:, 5};
magCol5 = abs(col5);
[maxValue, indexOfMax] = max(magCol5)
  5 Comments
ElizabethR
ElizabethR on 26 Apr 2016
Edited: ElizabethR on 26 Apr 2016
i have been tried it. thanks yo so much image analyst ^^ whether the format long g convert a decimal number with lots value after the comma to only 14 number after the comma?? i try to using format long g in my function, but this output is same like i don't use format long g thanks

Sign in to comment.

Categories

Find more on Data Type Conversion in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by