Borrar filtros
Borrar filtros

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

2 visualizaciones (últimos 30 días)
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 comentarios
KSSV
KSSV el 23 de Nov. de 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.

Iniciar sesión para comentar.

Respuesta aceptada

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

Más respuestas (0)

Categorías

Más información sobre Introduction to Installation and Licensing en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by