Borrar filtros
Borrar filtros

Difference between interp1() and fixpt_interp1

12 visualizaciones (últimos 30 días)
edamondo
edamondo el 25 de Nov. de 2016
Comentada: Walter Roberson el 8 de Mzo. de 2017
Hello,
I can't really understand the difference in between these two functions.

Respuestas (2)

Walter Roberson
Walter Roberson el 26 de Nov. de 2016
fixpt_interp1 is the Fixed Point Toolbox equivalent of interp1, to be used when the inputs are Fixed Point numbers.
  2 comentarios
Laercio Barbosa
Laercio Barbosa el 8 de Mzo. de 2017
I don't think they are ONLY for fixed points as it accepts float('single')/float('double') as inputs.
Try:
fixpt_interp1(double([10 90]/3.6), double([10,9]), double(50/3.6), float('single'), [], float('single'), [], 'simplest')
Walter Roberson
Walter Roberson el 8 de Mzo. de 2017
single and double are considered special subsets of fixed point numbers, so that you can do rapid simulation without altering the code all over the place. You would then convert to strict fixed point for deploying to VHDL or FPGA, or to processors which do not offer hardware single or double; also in some cases you would use fixed point for "hard real time" work, because doing so reduces the uncertainty in timing.

Iniciar sesión para comentar.


Laercio Barbosa
Laercio Barbosa el 8 de Mzo. de 2017
From my point of view after read documentation about both is that interp1 only interpolates. fixpt_interp1 offers you the possibility of round the result to fixed point and also scale the inputs.

Categorías

Más información sobre FPGA, ASIC, and SoC Development en Help Center y File Exchange.

Etiquetas

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by