필터 지우기
필터 지우기

How to resolve Error using reshape function?

조회 수: 2 (최근 30일)
Saad Alqahtani
Saad Alqahtani 2021년 7월 14일
댓글: Saad Alqahtani 2021년 7월 14일
Hi,
I'm trying to use this code to reshape a matrix x= 1x427289 but I keep getting this error:
Error using reshape
Size arguments must be real integers.
here is my code :
tm= (0.25*length (x)); % 25 percent interval of x
x=[x nan(1,tm*ceil(numel(x)/tm)-numel(x))]; % augment vector to make even
mnX=mean(reshape(x,tm,[]),1,'omitnan'); % take the mean over every 25 percent interval of x
Any help would be appreciated. Thanks in advance.

채택된 답변

Matt J
Matt J 2021년 7월 14일
tm= ceil(0.25*length (x)); %or floor?

추가 답변 (0개)

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by