From: yuan on
Hi everybody,

I'm stuck with a simple problem about how to construct an orthogonal matrix R, say of size m * n. Note that here m<n, for example, m = 20, n =100.

I try both SVD and Gram&#8211;Schmidt process, but i fail because the result is a special matrix in which (n-m) columns are zero.

Can anyone help me?

Thanks a lot:)
From: Matt J on
"yuan " <tianyuan_2003(a)163.com> wrote in message <hn73cn$aqp$1(a)fred.mathworks.com>...
> Hi everybody,
>
> I'm stuck with a simple problem about how to construct an orthogonal matrix R, say of size m * n. Note that here m<n, for example, m = 20, n =100.
>
> I try both SVD and Gram&#8211;Schmidt process, but i fail because the result is a special matrix in which (n-m) columns are zero.
===============

What makes this a failure?
From: TideMan on
On Mar 10, 4:24 pm, "yuan " <tianyuan_2...(a)163.com> wrote:
> Hi everybody,
>
> I'm stuck with a simple problem about how to construct an orthogonal matrix R, say of size m * n.  Note that here m<n, for example, m = 20, n =100.
>
> I try both SVD and Gram&#8211;Schmidt process, but i fail because the result is a special matrix in which (n-m) columns are zero.
>
> Can anyone help me?
>
> Thanks a lot:)

R=randn(m,n);
perhaps??

From: yuan on

thank you for the suggestion.
The following is my code:

a = rand(20,100);
c=mgrscho(a); // the Gram-sch process

however c'*c =/= I (identity matrix)
From: Walter Roberson on
yuan wrote:
>
> thank you for the suggestion.
> The following is my code:
>
> a = rand(20,100);
> c=mgrscho(a); // the Gram-sch process
>
> however c'*c =/= I (identity matrix)

M = [eye(5), zeros(5,4)];
c = M';

c' * c

ans =
1 0 0 0 0
0 1 0 0 0
0 0 1 0 0
0 0 0 1 0
0 0 0 0 1