Go to Post I never had any doubt; good people who do good quality work will always prosper. - Gary Dillard [more]
Home
Go Back   Chief Delphi > Other > Math and Science
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 04-15-2014, 06:40 PM
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 7,997
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
calling all MatLab gurus...



I have an M by N matrix A and an M by 1 column vector b.

I want to find the N by 1 column vector x which minimizes sum(abs(A*x-b)).

What is the recommended way to do this in MatLab?



Reply With Quote
  #2   Spotlight this post!  
Unread 04-15-2014, 08:58 PM
Jared Russell's Avatar
Jared Russell Jared Russell is offline
Taking a year (mostly) off
FRC #0254 (The Cheesy Poofs), FRC #0341 (Miss Daisy)
Team Role: Engineer
 
Join Date: Nov 2002
Rookie Year: 2001
Location: San Francisco, CA
Posts: 3,069
Jared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond repute
Re: calling all MatLab gurus...

I'd use linprog and solve the same linear program as in the Python thread.
Reply With Quote
  #3   Spotlight this post!  
Unread 04-15-2014, 11:43 PM
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 7,997
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
Re: calling all MatLab gurus...


Attached is an XLS spreadsheet with a 256-by-64 A matrix and a 256-by-1 b column vector.

Using your favorite tool or language, find the 64-by-1 column vector x which minimizes sum(abs(A*x-b)). Show your work.

Any takers?


Attached Files
File Type: xls Ax=b.XLS (125.5 KB, 29 views)

Last edited by Ether : 04-16-2014 at 12:09 AM.
Reply With Quote
  #4   Spotlight this post!  
Unread 04-17-2014, 03:56 PM
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 7,997
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
Re: calling all MatLab gurus...

Quote:
Originally Posted by Ether View Post
Attached is an XLS spreadsheet with a 256-by-64 A matrix and a 256-by-1 b column vector.

Using your favorite tool or language, find the 64-by-1 column vector x which minimizes sum(abs(A*x-b)). Show your work.

Any takers?
If there's anyone out there in CD land working on the above, please use the attached alternate b vector. It's more effective at revealing possible flaws in the solution.


Attached Files
File Type: xls b_alternate.xls (20.5 KB, 10 views)

Last edited by Ether : 04-17-2014 at 04:02 PM.
Reply With Quote
  #5   Spotlight this post!  
Unread 04-17-2014, 05:09 PM
The Doctor's Avatar
The Doctor The Doctor is offline
Robotics is life
AKA: Hackson
FRC #3216 (MR. T)
Team Role: Programmer
 
Join Date: Mar 2014
Rookie Year: 2013
Location: United States
Posts: 139
The Doctor is on a distinguished road
Re: calling all MatLab gurus...

Why?
Reply With Quote
  #6   Spotlight this post!  
Unread 04-19-2014, 05:16 PM
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 7,997
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
Re: calling all MatLab gurus...

Why what?
Reply With Quote
  #7   Spotlight this post!  
Unread 05-04-2014, 04:00 PM
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 7,997
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
Re: calling all MatLab gurus...

Quote:
Originally Posted by Ether View Post
I have an M by N matrix A and an M by 1 column vector b.

I want to find the N by 1 column vector x which minimizes sum(abs(A*x-b)).

What is the recommended way to do this in MatLab?
Turns out, this is a very interesting problem.

See discussion in this thread:

http://www.chiefdelphi.com/forums/sh...48&postcount=6


Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 04:51 AM.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi