Borrar filtros
Borrar filtros

Array indices must be positive integers or logical values.

1 visualización (últimos 30 días)
kaze
kaze el 1 de Oct. de 2022
Comentada: KSSV el 2 de Oct. de 2022
syms s;
t=10:0.1:100;
impulse=t==0;
f=32/(s-8);
y=subs(f,s,t);
impulse(y);
plot(y,[impulse]);
xlabel('x');
ylabel('y');
Array indices must be positive integers or logical values.
someone know how is this? i am starting with matlab i dont know why this happening.
  4 comentarios
Walter Roberson
Walter Roberson el 1 de Oct. de 2022
impulse=t==0;
That assigns impulse to be a variable, overriding its existence as a function. Within the rest of the scope, you can no longer call impulse as a function.
KSSV
KSSV el 2 de Oct. de 2022
You need to define impulse properly. What is impulse?

Iniciar sesión para comentar.

Respuestas (0)

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by