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

Thanks a lot
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

@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 Exchange에서 Signal Processing Toolbox에 대해 자세히 알아보기

질문:

2016년 1월 7일

댓글:

2023년 9월 24일

Community Treasure Hunt

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

Start Hunting!

Translated by