I have written a function which takes in a row vector A as the input. If A is a column vector, I want the program to convert it into a row vector (i.e., replace it by its transpose). This can be achieved using an if statement:
if size(A,1) ~= 1
A = A';
Is there a shorter way of impelmenting this that does not require an if statement?
Any suggestions would be greatly appreciated.