view rowVector.m @ 1198:2924b3a9b921 feature/d2_compatible

Add OpSet for fully compatible D2Variable, created from regular D2Variable by replacing d1 by first row of D1. Formal reduction by one order of accuracy at the boundary point.
author Martin Almquist <malmquist@stanford.edu>
date Fri, 16 Aug 2019 14:30:28 -0700
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