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

 採用された回答

Torsten
Torsten 2016 年 1 月 7 日

0 投票

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

2 件のコメント

Slavica Spasova
Slavica Spasova 2016 年 1 月 7 日
Thanks a lot
Walter Roberson
Walter Roberson 2016 年 1 月 7 日
It was a warning, not an error.

サインインしてコメントする。

その他の回答 (1 件)

Gilbert
Gilbert 2023 年 9 月 24 日

0 投票

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

1 件のコメント

Walter Roberson
Walter Roberson 2023 年 9 月 24 日
@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.

サインインしてコメントする。

カテゴリ

ヘルプ センター および File ExchangeSignal Processing Toolbox についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by