image thumbnail
from Time folding for sequences by Nikhil Prathapani
Performing Time folding operation on sequences

timefoldd.m
clear all;
close all;
clc;
x=input('enter the sequence');
a=length(x);
n=1:1:a;
subplot(2,1,1);
stem(n,x);
xlabel('number of samples');
ylabel('amplitude');
title('input signal');
m=-a:1:-1;
y=x(a-n+1);
subplot(2,1,2);
stem(m,y);
xlabel('number of samples');
ylabel('amplitude');
title('folded signal');
display(x);
display(y);
display(n);
display(m);

Contact us