Take the 2-minute tour ×
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.

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|improve this question

closed as off-topic by Ramanujan, azimut, amWhy, Dennis Gulko, userNaN 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." – Ramanujan, azimut, amWhy, Dennis Gulko, userNaN
If this question can be reworded to fit the rules in the help center, please edit the question.

1 Answer 1

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|improve this answer