Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

suppose I have two vectors

$ A=[ 1 ,2, 3, 4]$ $B=[ 5 ,6, 7, 8]$ of the sam length and an additional vector which is "smaller" by one elment, i.e. $C=[9, 10, 11]$. Now I define $\operatorname{display}=[A,B,C]$ and want to print a table, using $\operatorname{disp(display)}$. How do I have to change this "code" s.t. the the elements of C start in the second row? Thanks for you help

share|cite|improve this question

closed as off-topic by SHOBHIT GAUTAM, azimut, amWhy, Dennis Gulko, Norbert Oct 29 '13 at 18:39

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This question is not about mathematics, within the scope defined in the help center." – SHOBHIT GAUTAM, azimut, amWhy, Dennis Gulko, Norbert
If this question can be reworded to fit the rules in the help center, please edit the question.

up vote 0 down vote accepted

One way to achieve the shift would be to padd C:

C = [NaN C];

and then use disp.

share|cite|improve this answer