필터 지우기
필터 지우기

Difference between interp1() and fixpt_interp1

조회 수: 12 (최근 30일)
edamondo
edamondo 2016년 11월 25일
댓글: Walter Roberson 2017년 3월 8일
Hello,
I can't really understand the difference in between these two functions.

답변 (2개)

Walter Roberson
Walter Roberson 2016년 11월 26일
fixpt_interp1 is the Fixed Point Toolbox equivalent of interp1, to be used when the inputs are Fixed Point numbers.
  댓글 수: 2
Laercio Barbosa
Laercio Barbosa 2017년 3월 8일
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 2017년 3월 8일
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.

댓글을 달려면 로그인하십시오.


Laercio Barbosa
Laercio Barbosa 2017년 3월 8일
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.

카테고리

Help CenterFile Exchange에서 FPGA, ASIC, and SoC Development에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by