function [x,n]=edinecenImpuls(n0,n1,n2)
n=[n1:n2]; x=[(n-n0)==0];
I can't define this function in MATLAB It says " Use of brackets [] is unnecessary. Use parentheses to group, if needed."
I don't know what is wrong please help

 Respuesta aceptada

Torsten
Torsten el 7 de En. de 2016
function [x,n]=edinecenImpuls(n0,n1,n2)
n=n1:n2;
x=(n-n0)==0;
Best wishes
Torsten.

2 comentarios

Slavica Spasova
Slavica Spasova el 7 de En. de 2016
Thanks a lot
Walter Roberson
Walter Roberson el 7 de En. de 2016
It was a warning, not an error.

Iniciar sesión para comentar.

Más respuestas (1)

Gilbert
Gilbert el 24 de Sept. de 2023

0 votos

function [x,n]=edinecenImpuls(n0,n1,n2)
n=n1:n2;
x=(n-n0)==0;

1 comentario

Walter Roberson
Walter Roberson el 24 de Sept. de 2023
@Gilbert how does this differ from the solution given 7 years ago by @Torsten ? You even use the exact same variable names and exact same spacing.

Iniciar sesión para comentar.

Categorías

Más información sobre Signal Processing Toolbox en Centro de ayuda y File Exchange.

Etiquetas

Preguntada:

el 7 de En. de 2016

Comentada:

el 24 de Sept. de 2023

Community Treasure Hunt

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

Start Hunting!

Translated by