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

2 vues (au cours des 30 derniers jours)
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 commentaires
KSSV
KSSV le 23 Nov 2021
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.

Connectez-vous pour commenter.

Réponse acceptée

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

Plus de réponses (0)

Catégories

En savoir plus sur MATLAB dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by