how replace dirac to diracz when need ?
    조회 수: 5 (최근 30일)
  
       이전 댓글 표시
    
Q=f(dirac(x - 10.5)*sin(x)*(10+i))
Q=diracz(x - 10.5)*sin(x)*(10+i)
function p=diractz(x)
if x ==0
    p=1;
else
    p=0;
end
end
댓글 수: 0
답변 (1개)
  Star Strider
      
      
 2021년 8월 20일
        I am not certain what you want to do.  
Since the independent variable may never exactly be 10.5, I drew that separately (‘i’ is not defined other than by default being the imaginary operator): 
diracz = @(t) t==0;
x = linspace(0, 20, 1E+4);
Q = @(x) diracz(x-10.5) .* sin(x) * 10+1i;
figure
plot(x, real(Q(x)), '-b')
hold on
plot([10.49 10.5 10.51], real(Q([10.49 10.5 10.51])), '-r')
hold off
grid
ylim([-10  10])
.
댓글 수: 0
참고 항목
카테고리
				Help Center 및 File Exchange에서 Introduction to Installation and Licensing에 대해 자세히 알아보기
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


