plot a dirac function which is in symbolic - MATLAB -
this question has answer here:
i using code:
syms x ezplot(dirac(x-2))
the function 0 , 1 @ x=2. drawn figure 0 everywhere. how draw correctly?
in case value limited being symbolic variable can first change double format, rest in similar way. see
syms x x=2; s= double(x); s=2; smin=s-15; smax=s+15; p=smin:0.01:smax; q = double(p == 2); plot(p, q);
and having +-15 creating range around dirac function input.
Comments
Post a Comment