複数のプロットを重ねて表示する / hold on、hold off

hold onは解除するまで有効。解除するときはhold offを実行する。

plot(sample,mass2,"r*")
hold on
plot(sample,mass1,"ks")

続き

https://matlabacademy.mathworks.com/R2021b/jp/portal.html?course=gettingstarted#chapter=10&lesson=1§ion=1