view rowVector.m @ 443:12db86a8ec7b

Fix bug in spyh() when the matix has no non-zero elements.
author Jonatan Werpers <jonatan@werpers.com>
date Sun, 19 Mar 2017 13:39:49 +0100
parents 48b6fb693025
children
line wrap: on
line source

function r = rowVector(v)
    if  size(v,1) == 1
        r = v
    elseif size(v,2) == 1
        r = v';
    else
        error('v is not a matrix');
    end
end