Why am I getting the error "Array indices must be positive integers or logical values."?

2 ビュー (過去 30 日間)
function [Fluindex ] = find_Findex(Signal,timeframe,SampRate,slide )
%FIND_Kurtosis Summary of this function goes here
% Detailed explanation goes here
channels=size(Signal,2);
nFrames=size(Signal,1)/(timeframe*SampRate);
Fluindex=[];
if slide <=0
partition=1;
else
partition=slide/timeframe;
end
for f = 1:partition:nFrames
start_ind =((f-1)*timeframe*SampRate)+1;
end_ind = f*timeframe*SampRate;
Fluind_frame=[];
for i= 1:channels
Findex = zeros(2,3,4);
size(Findex)
Fluind_frame = zeros(3,4,5,6);
size( Fluind_frame)
Fluind_frame(:,i)= Findex (Signal(start_ind:end_ind,i));
end
Fluindex=cat(1,Fluindex,Fluind_frame);
end
end
when i run above code its show error like this.
Error using find_Findex
Array indices must be positive integers or logical values.
"why its showing like this??"
  2 件のコメント
KSSV
KSSV 2021 年 11 月 23 日
I don't think what you are showing us is not the complete error. There is no line 34 in the function.
Show us the complete code which gave you this error along with the inputs so that it will help us to help you.
Deepu S S
Deepu S S 2021 年 11 月 23 日
@KSSV please check the attached file

サインインしてコメントする。

採用された回答

Image Analyst
Image Analyst 2021 年 11 月 23 日
It's a FAQ, probably the #1 most FAQed FAQ.
Here is a thorough discussion of how that error occurs:

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMATLAB についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by