# shift -discrete signal

66 visualizaciones (últimos 30 días)
mohamed el 31 de Oct. de 2023
Comentada: Walter Roberson el 2 de Nov. de 2023
i want to shift signal to the right by time less than the sampling interval
for example i have sampling interval = 600 microsec and i want to shift signal by 100 microsec only
##### 0 comentariosMostrar -2 comentarios más antiguosOcultar -2 comentarios más antiguos

Iniciar sesión para comentar.

Walter Roberson el 31 de Oct. de 2023
If you have a fractional delay (as you seem to have -- 1/6 of a sample) then see
The discussion in the documentation talks about using different models for interpolation purposes.
##### 3 comentariosMostrar 1 comentario más antiguoOcultar 1 comentario más antiguo
Walter Roberson el 2 de Nov. de 2023
probably yes, but that requires the Phased Array toolbox
Walter Roberson el 2 de Nov. de 2023
Also delayseq does not give you any choice of interpolation models.

Iniciar sesión para comentar.

### Más respuestas (1)

recent works el 31 de Oct. de 2023
Assuming you have a signal x sampled at a rate of 600 microseconds and you want to shift it to the right by 100 microseconds, you can follow these steps:
1. Define your original signal x.
2. Define the sampling interval, which is 600 microseconds.
3. Define the desired time delay, which is 100 microseconds.
4. Calculate the number of samples to shift the signal, which is equal to the time delay divided by the sampling interval.
5. Use the circshift function to shift the signal by the calculated number of samples to the right.
% Define the original signal
Fs = 1 / 600e-6; % Sampling frequency (600 microseconds interval)
t = 0:1/Fs:1; % Time vector from 0 to 1 second
x = sin(2*pi*10*t); % Example signal (sine wave)
% Define the sampling interval and desired time delay
sampling_interval = 600e-6; % 600 microseconds
desired_time_delay = 100e-6; % 100 microseconds
% Calculate the number of samples to shift
samples_to_shift = round(desired_time_delay / sampling_interval);
% Shift the signal to the right
shifted_signal = circshift(x, samples_to_shift);
% Plot the original and shifted signals
figure;
subplot(2,1,1);
plot(t, x);
title('Original Signal');
subplot(2,1,2);
t_shifted = t - desired_time_delay; % Adjust the time vector
plot(t_shifted, shifted_signal);
title('Shifted Signal');
use circshift to shift the signal to the right by the specified number of samples.
##### 2 comentariosMostrar NingunoOcultar Ninguno
Walter Roberson el 31 de Oct. de 2023
The user wants to shift by 1/6 of a sample, not by 6 samples.
mohamed el 2 de Nov. de 2023
@recent works , can i use matlab code delayseq (signal,timedelay,sampling frequency ) in this condition

Iniciar sesión para comentar.

### Categorías

Más información sobre S-Parameters and Linear Components en Help Center y File Exchange.

### Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by