Matlab plot , skip every 9,10,19,20, etc
2 次查看(过去 30 天)
显示 更早的评论
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 ?
0 个评论
采纳的回答
Star Strider
2015-4-8
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])
0 个评论
更多回答(1 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Annotations 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!