This is what I get from Matlab R2013a
>> A
A =
1 1 0 0 0
1 1 0 0 0
1 1 0 0 0
1 1 0 0 0
1 1 0 0 0
1 0 1 0 0
1 0 1 0 0
1 0 1 0 0
1 0 1 0 0
1 0 1 0 0
1 0 0 1 0
1 0 0 1 0
1 0 0 1 0
1 0 0 1 0
1 0 0 1 0
1 0 0 0 1
1 0 0 0 1
1 0 0 0 1
1 0 0 0 1
1 0 0 0 1
>> orth(A)
ans =
-0.2236 0.1060 0.3725 -0.0000
-0.2236 0.1060 0.3725 -0.0000
-0.2236 0.1060 0.3725 -0.0000
-0.2236 0.1060 0.3725 -0.0000
-0.2236 0.1060 0.3725 -0.0000
-0.2236 -0.3495 -0.0348 -0.1633
-0.2236 -0.3495 -0.0348 -0.1633
-0.2236 -0.3495 -0.0348 -0.1633
-0.2236 -0.3495 -0.0348 -0.1633
-0.2236 -0.3495 -0.0348 -0.1633
-0.2236 -0.0143 -0.1302 0.3645
-0.2236 -0.0143 -0.1302 0.3645
-0.2236 -0.0143 -0.1302 0.3645
-0.2236 -0.0143 -0.1302 0.3645
-0.2236 -0.0143 -0.1302 0.3645
-0.2236 0.2577 -0.2076 -0.2012
-0.2236 0.2577 -0.2076 -0.2012
-0.2236 0.2577 -0.2076 -0.2012
-0.2236 0.2577 -0.2076 -0.2012
-0.2236 0.2577 -0.2076 -0.2012
On Wednesday, April 2, 2014 5:22:34 PM UTC+2, Douglas Bates wrote:
>
> On Tuesday, April 1, 2014 10:44:03 PM UTC-5, Gustavo Lacerda wrote:
>>
>> yes, I think that would be useful.
>>
>
> Do you know what Matlab's orth function returns for a rank deficient
> matrix? Suppose you ask for an orthogonal basis of the column space of a
> matrix like
>
> julia> hcat(fill(1.,(20,)), eye(4)[iceil([1:20] ./ 5),:])
> 20x5 Array{Float64,2}:
> 1.0 1.0 0.0 0.0 0.0
> 1.0 1.0 0.0 0.0 0.0
> 1.0 1.0 0.0 0.0 0.0
> 1.0 1.0 0.0 0.0 0.0
> 1.0 1.0 0.0 0.0 0.0
> 1.0 0.0 1.0 0.0 0.0
> 1.0 0.0 1.0 0.0 0.0
> 1.0 0.0 1.0 0.0 0.0
> 1.0 0.0 1.0 0.0 0.0
> 1.0 0.0 1.0 0.0 0.0
> 1.0 0.0 0.0 1.0 0.0
> 1.0 0.0 0.0 1.0 0.0
> 1.0 0.0 0.0 1.0 0.0
> 1.0 0.0 0.0 1.0 0.0
> 1.0 0.0 0.0 1.0 0.0
> 1.0 0.0 0.0 0.0 1.0
> 1.0 0.0 0.0 0.0 1.0
> 1.0 0.0 0.0 0.0 1.0
> 1.0 0.0 0.0 0.0 1.0
> 1.0 0.0 0.0 0.0 1.0
>
>
> Do you get 4 or 5 columns?
>
> The simple calculation gives you 5 columns but there should only be 4
> columns.
>