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:
Need help on using Matlab

Subject: Need help on using Matlab

From: Babloo Varaganti

Date: 23 Sep, 2010 01:35:28

Message: 1 of 4

I am new to Matlab and trying to solve four equations with four unknowns, please help me by guiding in the right direction.

Following is an problem that i am trying to solve using Matlab.
AB' is 2x1 matrix,
AB is 2x1 matrix,
AC' is 2x1 matrix,
AC is 2x1 matrix,
F is 2 x 2 matrix with four unknowns F11, F12, F21,F22.

I want to solve AB' = F * AB and AC' = F * AC to determine the four unknowns F11, F12, F21,F22 of matrix F.

Thanks
Babloo

Subject: Need help on using Matlab

From: Roger Stafford

Date: 23 Sep, 2010 02:07:06

Message: 2 of 4

"Babloo Varaganti" <babloo_varaganti@yahoo.com> wrote in message <i7eat0$4h6$1@fred.mathworks.com>...
> I am new to Matlab and trying to solve four equations with four unknowns, please help me by guiding in the right direction.
>
> Following is an problem that i am trying to solve using Matlab.
> AB' is 2x1 matrix,
> AB is 2x1 matrix,
> AC' is 2x1 matrix,
> AC is 2x1 matrix,
> F is 2 x 2 matrix with four unknowns F11, F12, F21,F22.
>
> I want to solve AB' = F * AB and AC' = F * AC to determine the four unknowns F11, F12, F21,F22 of matrix F.
>
> Thanks
> Babloo
- - - - - - - - -
  This is a straightforward problem in four linear equations in four unknowns. Arrange the equations in a proper form so you can use the matlab's backslash operator on them. (The resulting 4 x 4 matrix will be half filled with zeros.)

Roger Stafford

Subject: Need help on using Matlab

From: kumar vishwajeet

Date: 23 Sep, 2010 02:11:09

Message: 3 of 4

"Babloo Varaganti" <babloo_varaganti@yahoo.com> wrote in message <i7eat0$4h6$1@fred.mathworks.com>...
> I am new to Matlab and trying to solve four equations with four unknowns, please help me by guiding in the right direction.
>
> Following is an problem that i am trying to solve using Matlab.
> AB' is 2x1 matrix,
> AB is 2x1 matrix,
> AC' is 2x1 matrix,
> AC is 2x1 matrix,
> F is 2 x 2 matrix with four unknowns F11, F12, F21,F22.
>
> I want to solve AB' = F * AB and AC' = F * AC to determine the four unknowns F11, F12, F21,F22 of matrix F.
>
> Thanks
> Babloo

Let
AB' = [c ;d] ;
AB = [a; b] ;
AC' = [p ;q];
AC = [r ;s]
F = [F11 F12;F21 F22];
So as per your equations:
a*F11+b*F12 = c
a*F21+b*F22 = d
and,
r*F11+s*F12 = p
r*F21+s*F22 = q

So,
[a b;r s]*[F11;F12] = [c;p]
[F11;F12]=inv([a b;r s])*[c;p];
similarly
[F21;F22] = inv([a b;r s])*[d;q]

Subject: Need help on using Matlab

From: Roger Stafford

Date: 23 Sep, 2010 15:28:07

Message: 4 of 4

"Roger Stafford" <ellieandrogerxyzzy@mindspring.com.invalid> wrote in message <i7ecoa$1cn$1@fred.mathworks.com>...
> "Babloo Varaganti" <babloo_varaganti@yahoo.com> wrote in message <i7eat0$4h6$1@fred.mathworks.com>...
> > I am new to Matlab and trying to solve four equations with four unknowns, please help me by guiding in the right direction.
> >
> > Following is an problem that i am trying to solve using Matlab.
> > AB' is 2x1 matrix,
> > AB is 2x1 matrix,
> > AC' is 2x1 matrix,
> > AC is 2x1 matrix,
> > F is 2 x 2 matrix with four unknowns F11, F12, F21,F22.
> >
> > I want to solve AB' = F * AB and AC' = F * AC to determine the four unknowns F11, F12, F21,F22 of matrix F.
> >
> > Thanks
> > Babloo
> - - - - - - - - -
> This is a straightforward problem in four linear equations in four unknowns. Arrange the equations in a proper form so you can use the matlab's backslash operator on them. (The resulting 4 x 4 matrix will be half filled with zeros.)
>
> Roger Stafford
- - - - - - - -
  I should have given the simpler solution:

 F = [AB0,AC0]/[AB,AC];

where I use AB0 instead of AB' and AC0 instead of AC' since the apostrophe would be confused with matlab's conjugate transpose operator.

Roger Stafford

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