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:
Matrix calculation problem

Subject: Matrix calculation problem

From: John M

Date: 5 Nov, 2010 16:44:04

Message: 1 of 3

Hello,

I have the following equation

[f]=[A]*[T]

SIZE(A)=[150 149]
SIZE(f)=[150 1]

SIZE(t)=[149 1]



A,f known and T unknown, and I want to determine T. Have you got any idea how to do it in a nice way?

inv(A) is not possible because A is not square matrix.

Thanks.

Subject: Matrix calculation problem

From: Steven_Lord

Date: 5 Nov, 2010 16:46:36

Message: 2 of 3



"John M" <ioannis.mitsos@gmail.com> wrote in message
news:ib1c8k$rp1$1@fred.mathworks.com...
> Hello,
>
> I have the following equation
>
> [f]=[A]*[T]
>
> SIZE(A)=[150 149]
> SIZE(f)=[150 1]
>
> SIZE(t)=[149 1]
>
>
>
> A,f known and T unknown, and I want to determine T. Have you got any idea
> how to do it in a nice way?
>
> inv(A) is not possible because A is not square matrix.

Use backslash (HELP MLDIVIDE).

--
Steve Lord
slord@mathworks.com
comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ
To contact Technical Support use the Contact Us link on
http://www.mathworks.com

Subject: Matrix calculation problem

From: Roger Stafford

Date: 5 Nov, 2010 19:19:04

Message: 3 of 3

"John M" <ioannis.mitsos@gmail.com> wrote in message <ib1c8k$rp1$1@fred.mathworks.com>...
> .......
> [f]=[A]*[T]
> SIZE(A)=[150 149]
> SIZE(f)=[150 1]
> SIZE(t)=[149 1]
> .......
- - - - - - - - -
  Be aware that because you have 150 linear equations to solve and only 149 unknown variables to adjust, you cannot in general have a precise solution. The backslash will do the next best thing by giving you that T with the least sum of squared differences between f and A*T.

Roger Stafford

Tags for 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