MATLAB: How to make the x and y vector the same length


subplot(7,3,[7 16]+2); hold on;
This is the code I have, The sess5.time got more than 10,000 elements, how can I make it work?

Best Answer

  • Take a look at the documentation for linspace.
    If you only input the start and stop values, linspace creates a vector with 100 values. You can include a third input to specify the number of values to create. You can use the length command to determine the maximum dimesion of a variable. Use this to automatically determine the number of values to create.