AlecBGreen
(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:
|
newcriminal
(1000+ posts)
Send PM |
Profile |
Ignore
|
Sun Sep-19-10 06:44 PM
Response to Original message |
struggle4progress
(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? |
AlecBGreen
(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 |
AlecBGreen
(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.
|
struggle4progress
(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
|
AlecBGreen
(1000+ posts)
Send PM |
Profile |
Ignore
|
Sun Sep-19-10 08:01 PM
Response to Reply #6 |
|
it was the mean(A,2) that took it from rows to columns. Thanks S4P!
|
AlecBGreen
(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:
|
UndertheOcean
(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
|
DU
AdBot (1000+ posts) |
Sat May 04th 2024, 02:44 AM
Response to Original message |