Failure in look-up table / failure in my matlab

Hello,
i have a question about the look-up table function "fixpt_interp1" in matlab. I tried to run the code which is offered in the help section. (See attached m-file). I get no errors but:
By my opinion, the code itself is fine, but it is working wrong in my computer. I get the wrong results (see attached figure). By wrong i mean i expected a sine-output and not the "ramps" i get.
So my exactly question is: What is wrong with my matlab installation?
I use win7 64bit with matlab 2013b (also 64bit). I tried the same code with the same results with matlab 2012b. I even deleted java and all matlab version and reinstalled (java and matlab) with the same result.
regards Benedikt

 Respuesta aceptada

Simon
Simon el 19 de Nov. de 2013

0 votos

Hi!
The help uses sfix(8) instead of ufix(8) and another scaling: fixpt_interp1

3 comentarios

Benedikt
Benedikt el 19 de Nov. de 2013
I used the code i got from the "help fixpt_interp1" command. But indeed, if i use the code from the doc it's working. Can maybe someone explain the scaling effects? Do others also geht that "failure" with the help fixpt_interp1 code?
Simon
Simon el 19 de Nov. de 2013
Sorry, I have no Simulink, I just noticed the differences between your code and the online help. Maybe the help shipped with your version is wrong and it was fixed in the online version ...
Benedikt
Benedikt el 19 de Nov. de 2013
Anyway, you solved my problem, thanks for helping and answering my question! :)

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Introduction to Installation and Licensing en Centro de ayuda y File Exchange.

Preguntada:

el 19 de Nov. de 2013

Comentada:

el 19 de Nov. de 2013

Community Treasure Hunt

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

Start Hunting!

Translated by