How to generate 1 cycle of a ppg signal repeatedly?

3 visualizaciones (últimos 30 días)
Anupama V
Anupama V el 15 de Feb. de 2023
Comentada: Anupama V el 15 de Feb. de 2023
I want to repeat this signal periodically

Respuesta aceptada

Bhavana Ravirala
Bhavana Ravirala el 15 de Feb. de 2023
Hi Anupma!
I understand that you want to repeat the signal that you have generated. You can use ‘repmat’ function for this operation.
n_cycles = 10; % Number of cycles to generate
%ppg_cycle is the signal which you want to repeat.
ppg_signal = repmat(ppg_cycle, 1, n_cycles);
Please refer to the below documentation for more information.
Hope this helps!!

Más respuestas (1)

John D'Errico
John D'Errico el 15 de Feb. de 2023
You have a function, that is defined on what seems to be roughly the interval [0,220]. Since you have not given us any data, only a picture of that data, I'll make something up to show an example.
x = 0:220;
y = exp(-((x-110)/50).^2)*12 - 6;
plot(x,y,'-')
Now you wish to perform the periodic extrapolation of this function onto the real line.
smallspl = makima(x,y);
xdomain = [min(x),max(x)];
extrapfun = @(X) fnval(smallspl,xdomain(1)+ mod(X-xdomain(1),diff(xdomain)));
fplot(extrapfun,[-1000,1000])
So the fully periodic extrapolation of this form onto the real line. I used fnval, which presumes the curve fitting toolbox, but you could have used ppval instead. And if makima does not work for you, you could have used pchip to create the spline. Or you could have used spline.

Categorías

Más información sobre Parametric Spectral Estimation 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