MATLAB to Python?

Arnaud Delobelle arnodel at gmail.com
Wed Nov 17 09:53:20 CET 2010


MATLABdude <matlab.dude at mbnet.fi> writes:

> Hi!
>
> Can you, please, try to help me with Python? I try to convert a MATLAB
> program to Python.
>
> Here are the MATLAB codes:
> http://pastebin.com/eJetYizv
> http://pastebin.com/0eXTVfyN
>
> Here is my Python code:
> http://pastebin.com/jCPdLHx7
>
> What is wrong with my Python code? The program doesn't produce quite
> the same lambdas as the MATLAB program does. My code probably has lots
> of errors because I'm just learning the basics about Python.
>
> Thanks for all the help!

I don't understand what's going on in your code, but line 81 you have:

    xx = range(-kappa, h, kappa+1)

I guess that the step is supposed to be h, so you should write:

    xx = range(-kappa, kappa+1, h)

-- 
Arnaud



More information about the Python-list mailing list