Making a look-up table periodic
4 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
MARCO LORENZI
el 12 de Nov. de 2021
Comentada: MARCO LORENZI
el 16 de Nov. de 2021
Good morning everyone!
I have the following look-up table.

Basically, this table contains a sample that goes from -180 to 180deg and i would like this sample to be repeated with a period of 2*pi. (To be more clear, the input of the table goes from from -inf to +inf but the table manages only -180 to 180deg).
Is it possible?
0 comentarios
Respuesta aceptada
Chunru
el 12 de Nov. de 2021
theta = (-180:180);
x = randn(size(theta));
% Look up table/interpolant
F = griddedInterpolant(theta, x);
% wrap the input to +/-180
y = F(25)
y = F(wrapTo180(746))
5 comentarios
Chunru
el 14 de Nov. de 2021
You just neet to insert a matlab function block and using the wrapTo180 function.
Más respuestas (0)
Ver también
Categorías
Más información sobre String 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!
