Info
この質問は閉じられています。 編集または回答するには再度開いてください。
matlab code for 11-point sequence x(n) = 10 (0.8)n , 0 ≤ n ≤ 10, determine and plot x ((n − 6))15
1 回表示 (過去 30 日間)
古いコメントを表示
pls someone do post the code
0 件のコメント
回答 (1 件)
TED MOSBY
2025 年 6 月 18 日
Hi,
Asssuming the equations written in your question are these:
x(n)=10(0.8)^n, 0≤n≤10
x((n−6))_15
To get started you can follow the steps below:
1. Generate the original sequence:
n0 = 0:10;
x0 = 10*(0.8).^n0;
2. Place it in a length-15 frame:
N = 15;
n = 0:N-1;
x = zeros(1,N);
x(1:numel(x0)) = x0;
3. Apply the circular shift. MATLAB’s built-in circshift shifts and automatically wraps modulo N. A positive shift on a row vector moves samples to the right.
k = 6;
y = circshift(x,k); % y = x((n-6))_15
4. Visualize:
stem(n,y,'filled'), grid on
title('x((n-6))_{15}')
xlabel('n'), ylabel('Amplitude')
Here is more information about "circshift" : https://www.mathworks.com/help/matlab/ref/circshift.html
Hope this helps!
0 件のコメント
この質問は閉じられています。
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!