Monday, July 18, 2016

MATLAB's New Graphics System Finally Arrives



There are many changes that come with the new graphics system, such as greatly improved appearance of plots and other graphics objects, but there is one change that is particularly surprising to a seasoned MATLAB user.  This is the change of graphics handles from regular double precision scalars to handle objects.

In previous versions of MATLAB, creating a figure would look like this from the command line:


With R2014b, it looks like this:


>> h = figure
h = 
  Figure (1) with properties:

      Number: 1
        Name: ''
       Color: [0.9400 0.9400 0.9400]
    Position: [520 678 560 420]
       Units: 'pixels'

  Show all properties



With previous versions:


>> h = figure, peaks;

h =

     2


Friday, February 20, 2015

cuSOLVER: CUDA Library of Sparse and Dense Solvers

It has been a while, so I thought I'd break the ice by just pointing out that there is another great addition to the CUDA SDK -- cuSOLVER.

With the upcoming SDK 7 (now available as a release candidate, installer here for registered developers), there is a new library of sparse and dense solvers that claim to be up to 6x faster than equivalent MKL functions.  It also has solvers for eigen problems (yes, it's eigen, not Eigen!).  This should be great for all kinds of applications that need to solve linear systems via Cholesky, LU, SVD, and QR decompositions.  I  love how NVIDIA keeps expanding their free GPU-powered libraries!

cusolver cusolverDN speedup over CPU

If you get excited about new versions and features like I do, have a look at these brief NVIDIA announcement videos:

Monday, October 20, 2014

Back to the old blog commenting system

This is just a note that I've disabled the Google+ commenting system for this blog, which really wasn't worth it.  The regular system uses a authentication with any Google account and OpenID or a bunch of other options, so it should be easily accessible to just about everyone.  Maybe now I'll see a flood of comments!  Dare to dream.

Wednesday, October 08, 2014

Several Stack Overflow Contributors Suspended for Voting Irregularities, Again

Voting fraud on Stack Overflow is a common problem that the site administrators deal with constantly.  Typically, one or more "sockpuppet" accounts are used by the same person to vote on their own posts. Fortunately, the system is good at detecting these voting patterns and stopping the abuse, but it certainly can go on for long periods before they are stopped.  It's a manifestation of one Stack Overflow's many design flaws, but that's a longer (and ongoing) discussion, that has been an issue since the beginning of Stack Overflow.

I've seen users get suspended for a variety of reasons, including "low quality contributions", need for a "cooling off" period, and voting irregularities.  This week, one or more Stack Overflow contributors were recently suspended for voting irregularities.  Based on my reputation history for October 4, there appears to be at least 5 different accounts involved (or the corrections rolled out slowly as the system sifted through just one user's votes).
Stack Overflow Reputation adjustments following user suspension
Aftermath of the removal/suspension of multiple Stack Overflow users.
What this shows, I believe, is that these users hung around the [matlab] crowd, where I've posted 99% of my own answers, and they occasionally up-voted answers belonging to people such as myself.  (Note that I was an active contributor for about 9 months, with over 600 answers, so it's actually surprising how few votes I accumulated from these users).  Anyway, when the users are either removed or suspended, the rep gained from their up-votes is removed also.  This "penalty box" state is standard procedure according to mods and I've seen it in the past as users have deleted their accounts.  If this was a single user, there would be one entry in the reputation history, but there are multiple, so that could mean multiple users or the system took it's time computing the corrections.

Saturday, September 27, 2014

The Newest Nexus in the Family

We just got the Nexus 5 (32 GB) that I ordered on the Play Store for my wife, and not surprisingly I'm considerably more excited about it than she is.  That's not to say she's not extremely happy about her new phone, which is replacing an HTC Amaze (ruby) that just went belly up.  It's just that I'm really starting to love our collection of Google Nexus devices.
There's my Nexus 4 (mako) on the top right, the Nexus 7 (2nd gen, flo) on the bottom, and the Nexus 5 (hammerhead) on the left.  Coming soon: Nexus 6.
We've owned a plethora of other mobile devices, including an HTC Touch Cruise, myTouch 3G (aka magic), myTouch 4G (glacier), HTC Amaze (ruby), and a Galaxy Tab 10.1 (p4wifi), which were all misconceived on some level.  The best of these devices was the myTouch 4G, which survives to this day.  The Galaxy Tab was great for a while, but the flash memory is flawed and with no TRIM support (this device should have been codenamed glacier).  The Touch Cruise ran Windows Mobile - enough said.  The two myTouch devices were actually quite good, aside from HTC Sense occasionally crashing.  The myTouch 4G just kept on giving, with a 4.4.4 Evervolv ROM from xda-developers and a stable overclocking to 1.5 GHz.  The Amaze became very unstable, and despite many factory resets and several half-baked ROMs later, went to the phone junk yard (a drawer in the garage).

The Google Nexus devices put the others to shame.  The LG-made devices are particularly good.

Friday, September 26, 2014

Negative Zero and Complex Number Initialization in MATLAB

Background

Floating point numbers have one bit that is used to designate sign, and this bit applies when the value of the number is zero.  This is called "signed zero".  MATLAB hides this very well in most situations, but it does pop up in certain cases.  Recently this came up in a question on Stack Overflow involving complex numbers initialization.

Example

Below is a demonstration of how one complex number initialization syntax can inadvertently create a signed zero.

Create two complex numbers, a and b.  The intent it that both variables have the value (0, -1).
>> a = 0-j;
>> b = -j;
 Extract the real component and verify that they are 0, and that they are "equal".
>> ra = real(a)
ra =
     0
>> rb = real(b)
rb =
     0
>> ra==0
ans =
     1
>> isequal(ra,rb)
ans =
     1
But it's clear they are not equal with this operation:
>> 1/ra
ans =
   Inf
>> 1/rb
ans =
  -Inf
Interesting.  Why does rb clearly have a sign associated with it even though it is not visisble?