Matlab plot , skip every 9,10,19,20, etc

Hello forum
I have a vector of 160 values and would like to plot them but leave 2 unit spacing every 8 values. How can i achieve that ?

 Respuesta aceptada

Star Strider
Star Strider el 8 de Abr. de 2015
One approach:
V = rand(1, 160)+1; % Create Data
Vm = reshape(V, 10, []); % Create Temporary Matrix
Vm([9, 10],:) = NaN; % Insert NaNs In Last 2 Rows
figure(1)
plot([1:160], Vm(:)) % Plot
grid
axis([xlim 0 3])

Más respuestas (1)

RuiQi
RuiQi el 8 de Abr. de 2015

0 votos

Wow that is fast. Thanks !

Categorías

Más información sobre Line Plots en Centro de ayuda y File Exchange.

Etiquetas

Preguntada:

el 8 de Abr. de 2015

Editada:

el 7 de Jul. de 2016

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by