set the unit step function
    조회 수: 3 (최근 30일)
  
       이전 댓글 표시
    
Dear all, how can I set the function like this: x[n] = [1 2 3 4 5 6] with correlation n = [0 1 2 3 4 5]?
Thank you so much for your help
댓글 수: 0
답변 (1개)
  David Hill
      
      
 2022년 3월 2일
        Not sure what you are after. I assumed step function at n positions with applitudes 1:6
z=1:6;
n=0:5;
x=-1:.1:10;
scatter(x,d(x,z,n))
function y=d(x,z,n)
 y=zeros(size(x)); 
 for k=1:length(n)
    y(ismember(x,n(k)))=z(k);
 end
end
댓글 수: 0
참고 항목
카테고리
				Help Center 및 File Exchange에서 Thermal Analysis에 대해 자세히 알아보기
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!