First, you should avoid name your variable length, (which I think you mispelled in your example above as lenght) as length is a MATLAB command that gives the number of elements in an array. Using it as a variable will cause confusion, especially if you later use length as a command.
If you only get one point in your plot, I would suspect that your variable that you are plotting, tension, only has one element. Look at it in the works space tab to see. If so you will need to look back further in your code to see why it doesn't have as many elements as you expect.