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

조회 수: 1 (최근 30일)
Fehim Kadioglu
Fehim Kadioglu 2021년 10월 20일
댓글: Fehim Kadioglu 2021년 10월 20일
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.

답변 (1개)

KSSV
KSSV 2021년 10월 20일
x = rand(1,1001) ;
y = reshape(x,[],13) ; % reshape
iwant = max(y,[],2) ; % get max
  댓글 수: 4
KSSV
KSSV 2021년 10월 20일
For this you cannot reshape and do it. Read about findpeaks. Also have a look on envelope.
Fehim Kadioglu
Fehim Kadioglu 2021년 10월 20일
Okay, thanks for responding.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Descriptive Statistics에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by