Answer the question
In order to leave comments, you need to log in
How to understand an expression in MATLAB?
There is such a construction in matlab, I took it from the help:
n = -5:1:5;
x = dirac(n);
idx = x == inf;
x(idx) = 1;
Answer the question
In order to leave comments, you need to log in
idx = (x == inf);
>> x == inf
ans =
1×11 logical array
0 0 0 0 0 1 0 0 0 0 0
x(idx) = 1;
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question