how do i write a loop that will reverse only a row vector, then if if it is a column vector flip it?

1 view (last 30 days)
how do i write a loop that will reverse only a row vector, then if if it is a column vector flip it?
  1 Comment
dpb
dpb on 30 Oct 2013
for what operational definition of "flip"? You mean
doc fliplr % maybe?
As for the first, you don't need a loop; merely test if
size(vector,1)==1 % T for row vector

Sign in to comment.

Answers (0)

Categories

Find more on Loops and Conditional Statements in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!