MATLAB: How to draw sin(x) on middle of image with plot

digital signal processingimageimage processingplot

i want to draw sin(x) wave on middle of image but i can't.
my sinx on top of image but i dont want this.
I=imread('yazi.jpg')
I=rgb2gray(I)
I=imnoise(I,'salt & pepper',0.03)
[x1 y1]=size(I)
figure, imshow(I)
hold on
x=1:8:y1
y=sin(x)
z=x1/2
plot(x,y,'Color','white','LineWidth',2), axis 'tight',grid 'on';
i want like this

Best Answer

plot(x, y*(x1*1/6) + x1/2, 'Color', 'white', 'LineWidth', 2)