Democratic Underground Latest Greatest Lobby Journals Search Options Help Login
Google

Anyone good with Matlab programming?

Printer-friendly format Printer-friendly format
Printer-friendly format Email this thread to a friend
Printer-friendly format Bookmark this thread
This topic is archived.
Home » Discuss » The DU Lounge Donate to DU
 
AlecBGreen Donating Member (1000+ posts) Send PM | Profile | Ignore Sun Sep-19-10 06:43 PM
Original message
Anyone good with Matlab programming?
My wife is getting ready to smash her computer :hide:
Printer Friendly | Permalink |  | Top
newcriminal Donating Member (1000+ posts) Send PM | Profile | Ignore Sun Sep-19-10 06:44 PM
Response to Original message
1. I think LFP is.
Printer Friendly | Permalink |  | Top
 
struggle4progress Donating Member (1000+ posts) Send PM | Profile | Ignore Sun Sep-19-10 06:47 PM
Response to Original message
2. I've done some. What problem is ms having?
Printer Friendly | Permalink |  | Top
 
AlecBGreen Donating Member (1000+ posts) Send PM | Profile | Ignore Sun Sep-19-10 06:52 PM
Response to Reply #2
4. oops should have replied to you so you will notice on MyDU
see explanation below
Printer Friendly | Permalink |  | Top
 
AlecBGreen Donating Member (1000+ posts) Send PM | Profile | Ignore Sun Sep-19-10 06:51 PM
Response to Original message
3. OK here's the situation
she is writing a program to average each row of a matrix but the program is averaging the COLUMNS instead. Cant figure out whats up. The only programming I took was QBasic back in middle school so Im not much help. She has been working on this all day but she's stuck on this last little piece.
Printer Friendly | Permalink |  | Top
 
struggle4progress Donating Member (1000+ posts) Send PM | Profile | Ignore Sun Sep-19-10 07:09 PM
Response to Reply #3
6. She has several options
One is to look up "mean" (use "help" to search or look under Data Analysis >> Descriptive Statistics >> mean) and compare

A = <1 2 3; 3 3 6; 4 6 8; 4 7 7>
mean(A)
mean(A,1)
mean(A,2)

That should make everything clear, but it depends on properties of "mean"

The other possibility is to look up "transpose" (see, for example, "um, transpose, and diag" under magic squares in the intro section) and then compare

A = <1 2 3; 3 3 6; 4 6 8; 4 7 7>
A'
mean(A)
mean(A')
mean(A)'
mean(A')'

That again should make everything clear, but it's probably more general than the previous trick

I'd recommend she do both of the above

Once she realizes how easy it is, she'll feel stupid for not seeing it before -- but that's par for the course here and unavoidable


Printer Friendly | Permalink |  | Top
 
AlecBGreen Donating Member (1000+ posts) Send PM | Profile | Ignore Sun Sep-19-10 08:01 PM
Response to Reply #6
7. thats it!
it was the mean(A,2) that took it from rows to columns. Thanks S4P!
Printer Friendly | Permalink |  | Top
 
AlecBGreen Donating Member (1000+ posts) Send PM | Profile | Ignore Sun Sep-19-10 07:06 PM
Response to Original message
5. we've made a breakthrough!
apparently 8 hours wasnt sufficient. It took 8 hours + asking DU + 15 more minutes :) thanks anyway yall :hi:
Printer Friendly | Permalink |  | Top
 
UndertheOcean Donating Member (1000+ posts) Send PM | Profile | Ignore Sun Sep-19-10 08:02 PM
Response to Original message
8. I see your problem was solved
Edited on Sun Sep-19-10 08:03 PM by UndertheOcean
Printer Friendly | Permalink |  | Top
 
DU AdBot (1000+ posts) Click to send private message to this author Click to view 
this author's profile Click to add 
this author to your buddy list Click to add 
this author to your Ignore list Thu May 02nd 2024, 12:35 PM
Response to Original message
Advertisements [?]
 Top

Home » Discuss » The DU Lounge Donate to DU

Powered by DCForum+ Version 1.1 Copyright 1997-2002 DCScripts.com
Software has been extensively modified by the DU administrators


Important Notices: By participating on this discussion board, visitors agree to abide by the rules outlined on our Rules page. Messages posted on the Democratic Underground Discussion Forums are the opinions of the individuals who post them, and do not necessarily represent the opinions of Democratic Underground, LLC.

Home  |  Discussion Forums  |  Journals |  Store  |  Donate

About DU  |  Contact Us  |  Privacy Policy

Got a message for Democratic Underground? Click here to send us a message.

© 2001 - 2011 Democratic Underground, LLC