[SciPy-user] Matlab to numpy

Nils Wagner nwagner at iam.uni-stuttgart.de
Thu Jun 22 08:49:16 CDT 2006


David Douard wrote:
> On Thu, Jun 22, 2006 at 01:59:45PM +0200, Nils Wagner wrote:
>   
>>  I try to convert a Matlab code into Numpy/Scipy
>>
>> What is equaivalent to
>>
>> np = 36
>> t2 =rand(np,1)
>> r2=rand(np,1)./max(abs(sin(t2)),abs(cos(t2)))
>>
>> in numpy
>>
>> np=36
>> t2 = rand(np)
>> r2 = rand(np)/...  ?
>>     
>
> I would say, using numpy
>
> from numpy import *
> np = 36
> t2 = rand(np)
> r2 = rand(np)/maximum(absolute(sin(t2)),absolute(cos(t2)))
>
>
> David
>
>   
>> Nils
>>
>> _______________________________________________
>> SciPy-user mailing list
>> SciPy-user at scipy.net
>> http://www.scipy.net/mailman/listinfo/scipy-user
>>     
>
>   
> ------------------------------------------------------------------------
>
> _______________________________________________
> SciPy-user mailing list
> SciPy-user at scipy.net
> http://www.scipy.net/mailman/listinfo/scipy-user
>   
Thank you very much.
And what is equivalent to a so-called economy size decomposition ?

[Q,R] = qr(A,0)


Nils



More information about the SciPy-user mailing list