MATLAB to Python?

MATLABdude matlab.dude at mbnet.fi
Tue Nov 23 02:49:19 EST 2010


On Nov 23, 9:43 am, Arnaud Delobelle <arno... at gmail.com> wrote:
> T0_orig is a list and you are trying to multiply this list by a float
> (m**-1)

Yes, yes of course. Thanks! :)

This works:
---8<---8<---8<---
    T0_orig = [5, 50, 500, 5000]
    for counter in T0_orig:
        T0 = (L**2)/(D*pi**2)*counter
        amax = T0/kappa
        alpha = (10**-6)*amax
        lambda_, xx, f = nonhomog_solver(kappa, alpha, nu, nx)
        V0 = sqrt( counter*(m**-1) + pi**2 * D/(m*L**2)*lambda_ )
        print "V0 = ", V0
        print ""
---8<---8<---8<---



More information about the Python-list mailing list