Why am I getting "Array indices must be positive integers or logical values" error?
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Shubh Shah
el 22 de En. de 2021
Comentada: Shubh Shah
el 22 de En. de 2021
Array indices must be positive integers or logical values.
Error in A2Q1>LinearConv (line 68)
yc(i) = yc(i) + x1(i-j+1).*x2(j);
function yfnc = LinearConv(x1, x2, len)
yc = zeros(1, len);
for i = 1:len
%Total terms will be 1 to len
for j = 1:(i+1)
if(i-j+1<length(x1) && j<length(x2))
yc(i) = yc(i) + x1(i-j+1).*x2(j);
%Equation
end
end
end
yfnc = yc;
end
Respuesta aceptada
Más respuestas (0)
Ver también
Categorías
Más información sobre Creating and Concatenating Matrices en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!