set the unit step function
1 回表示 (過去 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 で Behavior and Psychophysics についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!