Catch up on stories from the past week (and beyond) at the Slashdot story archive

 



Forgot your password?
typodupeerror
×

Comment Re:Another way to save money (Score 1) 851

Pretty much the same story here -- I have a TracFone Motorola V170 -- I think it's about 5 years old, and I paid about $30 for the phone back then. I buy a $100 card once a year, which has more minutes than I need (I still need to buy the card to extend the service for another year). My battery was dying on me a couple years ago, but a friend had the same phone and switched to T-Mobile, so I cannibalized his battery. I'd actually love to have a smartphone, but don't want to pay $80/month for one.

Science

Submission + - Biodegradable Golf Balls Made From Lobster Shells

sunhou writes: Researchers at the University of Maine have found a way to take lobster shells, an otherwise wasted byproduct of the lobster industry, and produce biodegradable golf balls from them. Apparently biodegradable golf balls are themselves an industry, e.g. as people enjoy hitting balls off cruise ships (though environmentalists would rather they didn't). Other potential uses for the material are flower pots which conveniently degrade when buried in the soil, providing nutrients to the plant within.

Comment Chinese version of this (Score 1) 203

Pleco Software ( http://www.pleco.com/ ) has a version of this for their excellent Chinese dictionary software. There's a video of the prototype at http://www.youtube.com/watch?v=x7VTo0656Rc

I'm not sure if the above works on the latest (4th-gen) iPod Touch with camera, or only iPhone.

I'm not affiliated with Pleco, other than as a very happy customer of theirs for about 8 years. I first got their electronic Chinese dictionary software for a Palm Pilot back then, and then more recently migrated (for free) to their iOS version for my iPod Touch. The dictionaries they license aren't cheap, but they're very good, and their software and support is great; I highly recommend them.

Comment Re:Show me some example code (Score 1) 382

I used to think R was very specific for stats as well, but eventually a colleague told me he was pretty sure it could do most of what I used Matlab for (spatial stochastic models, basically continuous-time stochastic cellular automata). See my comment and link to Matlab/R reference over at:
http://developers.slashdot.org/comments.pl?sid=1084091&cid=26371723

Comment Re:Show me some example code (Score 3, Informative) 382

I used to use Matlab quite a lot (mostly for prototyping simulations and for visualization; I use C for my "real" simulations which take a lot of CPU time, since they run so much faster in C). I learned R about 2 years ago, and found that it can do pretty much everything Matlab can that I need for my own research.

Anyway, I wrote up a "Matlab / R Reference" that translates the basics between the two packages. It doesn't have highly specialized stuff, but many people have found it handy. I use my own reference quite a bit myself, since these days I mix up commands between the two packages quite a bit. It's available at:
http://www.math.umaine.edu/faculty/hiebeler/comp/matlabR.html

Comment Re:Freak your colleagues out with "no loop" code.. (Score 1) 382

If you want to get the rows of an array (x) with 0 on column 1, you do x[x[,1]==0]. basically, x[,1] gives you a one column table with the appropriate column, x[,1]==0 gives you a vector of true,false values, which you can use to index into the array again.

While that does pull out the rows which have 0 in column 1, it packs those return values into a vector (the first element of each of the selected rows, followed by the second element of the selected rows, etc.). If you want to extract those rows of the matrix, and keep them in matrix form, then this will do it (note the extra comma):
x[x[,1]==0,]

Yes, R is pretty nice in that sense. Matlab can do many of the same tricks, e.g. the Matlab equivalent of my command above is
x(x(:,1)==0,:)
Matlab doesn't have a simple way to do your version that I know of, since Matlab doesn't automatically recycle a vector index to a matrix. You'd have to do something like x(repmat(x(:,1)==0,n,1)) where n is the number of columns in x -- or to avoid hardcoding the n, you could do x(repmat(x(:,1)==0,size(x,2),1)) which is starting to get ugly isn't it?

Slashdot Top Deals

Top Ten Things Overheard At The ANSI C Draft Committee Meetings: (5) All right, who's the wiseguy who stuck this trigraph stuff in here?

Working...