Computer Questions Not Worth Their Own Thread II

But can you do that for a matrix of values? I need to search a 50x1000 grid for the k-th largest value, and then return the string associated with the row of that largest value (which is in the first column).
 
Ahh, okay... Matrixes are a pain in Excel, if possible I would look to convert to a single column.

But failing that, you would need a final column at the end, which tries to match it in each individual row. If it finds a match, it will return a number; if it can't find a match, it will return #N/A. So then your label value will be the only row that contains a number and not #N/A.

EDIT: Wait I can see where this is going. You're going to need it for 1000000000bazillion different values for "k" aren't you :p . Either convert to a single column, or write a macro (fairly straightforward?).
 
Ahh, okay... Matrixes are a pain in Excel, if possible I would look to convert to a single column.

But failing that, you would need a final column at the end, which tries to match it in each individual row. If it finds a match, it will return a number; if it can't find a match, it will return #N/A. So then your label value will be the only row that contains a number and not #N/A.

EDIT: Wait I can see where this is going. You're going to need it for 1000000000bazillion different values for "k" aren't you :p . Either convert to a single column, or write a macro (fairly straightforward?).

Not bazillions, but yeah, that's where this was going. :)

I think I need to go the macro route or go the MATLAB route (which I finally got working after 4 hours of wrangling with the license!), so hopefully I'm set now.
 
I think this works?

Function MatchMatrix(v As Range, m As Range)
'v = value to look for
'm = matrix to look in

Dim c As Range

For Each c In m.Cells
If c = v Then Exit For
Next c

MatchMatrix = c.Row
End Function


EDIT: can change that last line to "MatchMatrix = Array(c.Row, c.column)" if you want to return both values as an array function.
 
I never ever was able to learn excel to any degree. Partly this was because I didn't *need* to do anything odd, but more because I never needed to use it every day.

Anyone know of some basic tutorials not in video form?

I'd love, for practice, to enter a data set like my daughter's weight gain over 10 months and learn how to manipulate the data. Or her milk intake (we've logged almost every feeding by time of day and amount)
 
I am pretty good with basic functions like means, standard deviations, confidence intervals, etc. Basically all entry-level statistics stuff. What kind of calculations are you looking for? You could build a pretty nice chart that has a moving average and a regression line showing how her weight changes over time.

I ended up learning C++ and Java instead of VBA in high school, and I never learned how to do the really powerful stuff in Excel.
 
It's best to just get in and muck around, and this holds true for everything save situations where you are truly lost (Adobe Suite comes to mind).
 
It's best to just get in and muck around, and this holds true for everything save situations where you are truly lost (Adobe Suite comes to mind).

Yeah, this. I taught myself Excel VBA because I wanted to design a baseball simulator and I screwed around working towards that end. The best way to learn coding is to mess up at coding and then understand and correct your mistakes.

That being said, I found this guy to be a good primer if you know absolutely nothing about VBA
 
Muddling through and googling when you don't know how to do something is the best way of learning an awful lot of things tbh.
 
BTW, kind of showing off my awesome spreadsheet, but here's the sort of thing you can do in Excel: http://sdrv.ms/19JW3kz . Hopefully you can see the formulas (PM if you want the .xlsx). Basically I took the last 20 co-op games me and my friends played on Fifa 14, and analysed the results by reference to our opponents' win/loss record. So the first 3 columns just show our results in the game, while the next 3 columns show our opponents' overall Win/Draw/Loss record. Then I did a noddy little linear regression to try to predict whether we would win or lose based on our opponent's w/d/l %s. Then I said that the difference between the model's predicted result and the actual result was down to which of the 5 of us were playing together in that match, i.e. whether we had good players playing or bad players. So if we won a game that the model said we should have lost, it was because we had better players playing, and vice versa (i.e. I didn't consider this thing losers like to call "luck" at all). Finally, I averaged each of our "team bonus" scores, to see which of the 5 of us were the best player, statistically.

It turns out that I (my initials are AM) am slightly worse than average in terms of results, and a lot worse in terms of goal difference (which makes sense - I'm not very good at scoring :p). RT is the worst performer by a long way, which is great because he's an arrogant SOB ;). Interestingly, while MK has the highest overall Win %, those wins were against opponents who were statistically not very good, and therefore we should have beaten anyway. Thus, MK has a very middling result score and a lower than average GD score. The other thing it demonstrated -- contrary to MC's ever lengthening litany of "theories" about the "fifa drama engine" deliberately making us lose at the last minute etc -- we really do lose to teams that are better than us, and beat teams that are worse than us.

Anyway that's the sort of cool and totally not sad thing you can do with a spreadsheet if you have an hour to kill.
 
Excel is a riduculously useful piece of software. I'm a hydraulics engineer and I do more of my design work in Excel than all the specialist programmes put together. :lol:
 
I am currently using 3 disks on my PC: A Kingston SSD for my WIN7 install and two Seagate Barracuda 1.5 TB HDs for data storage. My motherboard is a M4A89GTD PRO.

If I set the Kingston SSD as primary boot device in the bios HD list, the PC refuses to boot ("No booting device found, reboot and select proper boot device or insert media into boot device"). If I set is as secondary device after one of the Seagate HDs, the system will boot properly.

What might cause this strange behaviour?
 
Fiddle with BIOS boot options. It's hard to help without seeing what's there. I had a problem like this where Windows 8 was configured to boot using a SSD as a quick boot, preventing it from being used as a normal boot disc. Changed it to legacy boot, and things work fine now.
 
My new comp is crashing a lot. And I can't figure anything which is a cause if it. I'm pretty sure it's not a CPU heat issue. What happens is it goes dark, sits for a minute, shuts off, and then reboots. Any ideas?
 
Overheating immediately comes to mind, could also be a corrupted driver or failing hardware problem. What sort of scenario is this happening to you in? Idling, running games?
 
Running fairly light. CPU temp under 40C. The only log alert I can find says "kernal power", but I couldn't find an explanation for that. All the hardware is only a couple of months old. There's no common times that it's happening, that I can figure.
 
Back
Top Bottom