我有一个具有 1000 个值的向量 x,使用符号学函数在 matlab 中绘图,我想将值 x(1:10:1000) 的标记更改为不同。我该怎么做?
我尝试使用以下方式将新标记用作圆圈:
semiology(x(1:10:1000), y(1:10:1000), 'o');
但是绘制前 100 个值,我的意思是新标记将显示在旧图的前 100 个值上,它不会分布在整个旧图上。但是,我需要在相同的值上显示新标记。
我猜从你的问题来看,所有点的原始情节都被清除了。如果是这样,那么可以使用命令
hold on
来保留该图。对于你的情况:
semilogy(x, y, 'o'); % Plot the entire vector with the 'o' marker
hold on; % Do not let semilogy replace the current plot
semilogy(x(1:10:1000), y(1:10:1000), 'x'); % mark every 10th point with an 'x'