How do i find max value between 1 and 13 column of 1001 columns.

1 view (last 30 days)
Fehim Kadioglu
Fehim Kadioglu on 20 Oct 2021
Commented: Fehim Kadioglu on 20 Oct 2021
t = 0:1/100:10;
x = 5*sin(2*pi*5*t) + 3*cos(2*pi*t)
x = 1×1001
3.0000 4.5392 5.9153 6.9919 7.6610 7.8532 7.5446 6.7596 5.5678 4.0781 2.4271 0.7665 -0.7520 -1.9914 -2.8430 -3.2366 -3.1478 -2.5998 -1.6616 -0.4407 0.9271 2.2912 3.5011 4.4211 4.9437 5.0000 4.5669 3.6691 2.3768 0.7990
I want to find max value between 1 and 13 column after that between 14 and 27 so on to 1001.

Answers (1)

KSSV
KSSV on 20 Oct 2021
x = rand(1,1001) ;
y = reshape(x,[],13) ; % reshape
iwant = max(y,[],2) ; % get max
  4 Comments

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!