Filter löschen
Filter löschen

how to multiply an image by a cosine(x) function?

1 Ansicht (letzte 30 Tage)
TULIKA
TULIKA am 3 Jul. 2014
Kommentiert: TULIKA am 3 Jul. 2014
i've tried but there shows some dimension problem....plzz give an exam
  2 Kommentare
Geoff Hayes
Geoff Hayes am 3 Jul. 2014
Tulika - please update your question to include the code you have used to apply the cosine function. As well, if there is an error message, include that as well.
TULIKA
TULIKA am 3 Jul. 2014
f=zeros(600,600); f(50:80,1:50)=1; f(10:100,50:150)=1; f(1:600,180:210)=1; f(20:120,250:350)=1; f(40:80,350:380)=1; f(1:80,380:410)=1; f(40:80,410:450)=1; f(5:100,450:550)=1; f(1:600,570:590)=1; f(200:300,50:150)=1; f(300:350,70:120)=1; f(350:400,1:180)=1; f(200:300,250:350)=1; f(240:260,350:400)=1; f(260:600,380:400)=1; f(430:530,50:150)=1; f(320:420,250:350)=1; f(360:380,350:380)=1; f(340:400,400:450)=1; f(330:410,450:560)=1; f(220:300,480:580)=1; f(300:330,510:560)=1; f(440:540,450:550)=1; figure,imshow(f,'InitialMagnification','fit'); x=linspace(-pi, pi, 100); sf=6; sinewave=sin(x*sf); onematrix=ones(size(sinewave)); sinewave2D=(onematrix'*sinewave); imagesc(sinewave2D); imagesc(sinewave2D) colormap(gray) axiss off; axis off; x=linspace(-pi, pi, 100); sf=6; sinewave=sin(x*sf); onematrix=ones(size(sinewave)); sinewave2D=(onematrix'*sinewave); imagesc(sinewave2D) A=(f.*sinewave2D); A=immultiply(f,sinewave2D); A=(f. *sinewave2D);
i dont kno what is the problem i'm very new to matlab

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

Image Analyst
Image Analyst am 3 Jul. 2014
See attached test.m which will produce this image.

Weitere Antworten (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by