how to put marker on plot which is not in continuous
조회 수: 1 (최근 30일)
이전 댓글 표시
i have already used this code for putting marker in plot, I got graph like this I need to put marker after some cycle, is this can do manualy in graph or what should i change in code, please help me
%this is my program clc X=0:0.002:10;
%ph=90;
A=3.5;
w=2*pi*0.25;
w2=2*pi*0.3;
w3=2*pi*0.35;
Y=A*sin(w*X);
Y1=A*sin(w2*X);
Y2=A*sin(w3*X);
plot(X,Y,X,Y1,X,Y2)
hold on
Xi = X(X>=4.08 & X<=4.36) ;
y2 = Y2(X>=4.08 & X<=4.36) ;
plot(Xi(1:10:end),y2(1:10:end),'sk')
hold on
ill get plot i have attached,
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/160113/image.jpeg)
but i need put marker like this image, repeating markers after some cycle, but i have only x values.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/160114/image.jpeg)
how can i do this.
thank you
댓글 수: 0
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Line Plots에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!