I have some Matlab code I'm porting to Julia
BiasHN = rand(HN(i+1),1)*2 -1;
BiasHN = orth(BiasHN);
Was the equivalent of the orth() from Matlab added to Julia? Can't seem to
find it.
Andre
On Thursday, April 3, 2014 10:32:31 PM UTC+9, Alan Edelman wrote:
>
> Maybe something like this
>
> function orth(A,thresh=eps(A[1]))
> (U,S)=svd(A)
> U[:, S.>S[1]*thresh]
> end
>
> orth(float(A))
>
> 20x4 Array{Float64,2}:
>
> -0.223607 -0.213651 0.183753 0.265684
>
> -0.223607 -0.213651 0.183753 0.265684
>
> -0.223607 -0.213651 0.183753 0.265684
>
> -0.223607 -0.213651 0.183753 0.265684
>
> -0.223607 -0.213651 0.183753 0.265684
>
> -0.223607 0.0371419 -0.372503 0.0993058
>
> -0.223607 0.0371419 -0.372503 0.0993058
>
> -0.223607 0.0371419 -0.372503 0.0993058
>
> -0.223607 0.0371419 -0.372503 0.0993058
>
> -0.223607 0.0371419 -0.372503 0.0993058
>
> -0.223607 0.350358 0.163883 -0.0197973
>
> -0.223607 0.350358 0.163883 -0.0197973
>
> -0.223607 0.350358 0.163883 -0.0197973
>
> -0.223607 0.350358 0.163883 -0.0197973
>
> -0.223607 0.350358 0.163883 -0.0197973
>
> -0.223607 -0.173849 0.0248676 -0.345193
>
> -0.223607 -0.173849 0.0248676 -0.345193
>
> -0.223607 -0.173849 0.0248676 -0.345193
>
> -0.223607 -0.173849 0.0248676 -0.345193
>
> -0.223607 -0.173849 0.0248676 -0.345193
>
>
>
>
> On Thursday, April 3, 2014 9:23:14 AM UTC-4, Alan Edelman wrote:
>>
>> I would use the svd with a threshold based on the norm
>> and optionally adjustable
>>
>>