Index in position 1 is invalid. Array indices must be positive integers or logical values Error
Pdata=0:floor(length(pressure01)/400);
for i=0:length(pressure01)
for j=0:floor(length(pressure01)/400)
if mod(i,400)==0;
Pdata(j)=pressure01(i,1);
end
end
end
Im trying to get the code to work but it gives me an error in line 5 saying "Index in position 1 is invalid. Array indices must be
positive integers or logical values."
pressure01 is a column vector, not sure whats wrongPdata=0:floor(length(pressure01)/400);
for i=0:length(pressure01)
for j=0:floor(length(pressure01)/400)
if mod(i,400)==0;
Pdata(j)=pressure01(i,1);
end
end
end
Im trying to get the code to work but it gives me an error in line 5 saying "Index in position 1 is invalid. Array indices must be
positive integers or logical values."
pressure01 is a column vector, not sure whats wrong Pdata=0:floor(length(pressure01)/400);
for i=0:length(pressure01)
for j=0:floor(length(pressure01)/400)
if mod(i,400)==0;
Pdata(j)=pressure01(i,1);
end
end
end
Im trying to get the code to work but it gives me an error in line 5 saying "Index in position 1 is invalid. Array indices must be
positive integers or logical values."
pressure01 is a column vector, not sure whats wrong code, error MATLAB Answers — New Questions