Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
Null space, empty matrix 5-by-0 error

Subject: Null space, empty matrix 5-by-0 error

From: Alan`

Date: 5 Jun, 2011 18:17:02

Message: 1 of 3

so i'm making this program to find the basis for the null space of A and B where B=A tranpose
>> in put
function projecttwo (y,o,u,r,U,F,i,d)
A=[ 1 2 3 4 5 6 7 8; 1 4 9 16 25 36 49 64; 1 8 27 64 125 216 343 512; 1 16 81 256 625 1296 2401 4096; y o u r U F i d];
B=A.';
%null spaces of A and B

nullA=null(A)
nullB=null(double(B))

end

>>output after entering my the last row

nullA =

   -0.0967 -0.4142 -0.5271
   -0.0002 0.1666 0.7011
    0.0710 0.2073 -0.1526
    0.3056 0.2041 -0.3503
   -0.7254 -0.3303 0.1168
    0.5755 -0.4105 0.2112
   -0.1858 0.6293 -0.1595
    0.0170 -0.2060 0.0312


nullB =

   Empty matrix: 5-by-0
when i go run the program, nullB appears as empty matrix 5 by 0 so i'm trying to figure out what i can do to fix this. In my class they don't really teach us Matlab, it's a linear algebra class so we gotta do all the learning on our own. Thanks for he help in advance.

Subject: Null space, empty matrix 5-by-0 error

From: Greg Heath

Date: 5 Jun, 2011 18:59:37

Message: 2 of 3

On Jun 5, 2:17 pm, "Alan` " <alan_ec...@hotmail.com> wrote:
> so i'm making this program to find the basis for the null space of A and B where B=A tranpose>> in put
>
> function projecttwo (y,o,u,r,U,F,i,d)
> A=[ 1 2 3 4 5 6 7 8; 1 4 9 16 25 36 49 64; 1 8 27 64 125 216 343 512; 1 16 81 256 625 1296 2401 4096; y o u r U F i d];
> B=A.';
> %null spaces of A and B
>
> nullA=null(A)
> nullB=null(double(B))
>
> end
>
> >>output after entering my the last row

Well, what is your last row?


Greg

Subject: Null space, empty matrix 5-by-0 error

From: Greg Heath

Date: 5 Jun, 2011 19:13:42

Message: 3 of 3

On Jun 5, 2:59 pm, Greg Heath <he...@alumni.brown.edu> wrote:
> On Jun 5, 2:17 pm, "Alan` " <alan_ec...@hotmail.com> wrote:
>
> > so i'm making this program to find the basis for the null space of A and B where B=A tranpose>> in put
>
> > function projecttwo (y,o,u,r,U,F,i,d)
> > A=[ 1 2 3 4 5 6 7 8; 1 4 9 16 25 36 49 64; 1 8 27 64 125 216 343 512; 1 16 81 256 625 1296 2401 4096; y o u r U F i d];
> > B=A.';
> > %null spaces of A and B
>
> > nullA=null(A)
> > nullB=null(double(B))
>
> > end
>
> > >>output after entering my the last row
>
> Well, what is your last row?
>
> Greg

Nevermind. I just used (1:8).^5 and got the same result.

Then it became obvious: Think of A as representing
8 variables constrained by only 5 equations.

You can fill in the blanks.

Hope this helps,

Greg

Tags for this Thread

No tags are associated with this thread.

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us