Clear Filters
Clear Filters

Vector of min or max for 3 vectors

14 views (last 30 days)
judy abbott
judy abbott on 17 Sep 2017
Answered: Jan on 17 Sep 2017
Please for A, B and C vectors as:
A = [2; 0; -4; 4];
B = [0; -6; -2; 1];
C = [4; 1.5; 4; -2];
i need to get the min for each vector row: min (2, 0 and 4) = 0 and stock them in a vector,
VMIN = [0; -6; -4; -2]
VMAX = [4; 1.5; 4; 4]
  1 Comment
Jan
Jan on 17 Sep 2017
Is this a homework? If so, please mention this explicitly, because then a different kind of answering is required.

Sign in to comment.

Accepted Answer

Jan
Jan on 17 Sep 2017
Start with creating a matrix:
M = [A, B, C]
Then the min and max commands create the output directly.

More Answers (0)

Categories

Find more on MATLAB 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!