How to make the x and y vector the same length
20 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Junyao Zhang
el 22 de Nov. de 2020
Comentada: Junyao Zhang
el 22 de Nov. de 2020
subplot(7,3,[7 16]+2); hold on;
sess5.LRx=linspace(-135,135);
plot(sess5.LRx,sess5.time,'b');
This is the code I have, The sess5.time got more than 10,000 elements, how can I make it work?
0 comentarios
Respuesta aceptada
Cris LaPierre
el 22 de Nov. de 2020
Editada: Cris LaPierre
el 22 de Nov. de 2020
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.
sess5.LRx=linspace(-135,135,length(sess5.time));
Más respuestas (0)
Ver también
Categorías
Más información sobre Resizing and Reshaping Matrices en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!