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

 Akzeptierte Antwort

Torsten
Torsten am 7 Jan. 2016

0 Stimmen

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

2 Kommentare

Thanks a lot
It was a warning, not an error.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (1)

Gilbert
Gilbert am 24 Sep. 2023

0 Stimmen

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

1 Kommentar

Walter Roberson
Walter Roberson am 24 Sep. 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.

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Signal Processing Toolbox finden Sie in Hilfe-Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by