Why am I getting the error "Array indices must be positive integers or logical values."?
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Deepu S S
am 23 Nov. 2021
Beantwortet: Image Analyst
am 23 Nov. 2021
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 Kommentare
KSSV
am 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.
Akzeptierte Antwort
Image Analyst
am 23 Nov. 2021
It's a FAQ, probably the #1 most FAQed FAQ.
Here is a thorough discussion of how that error occurs:
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Introduction to Installation and Licensing finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!