Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
help...error....

Subject: help...error....

From: praneeth

Date: 16 Nov, 2010 16:13:03

Message: 1 of 3

I am using this program

I = imread('eight.tif');
J = imnoise(I,'salt & pepper',0.02);
K = medfilt2(J);
imshow(J), figure, imshow(K)

but Iam getting the following error
??? Attempt to execute SCRIPT medfilt2 as a function:
C:\Users\praneeth\Documents\MATLAB\medfilt2.m

Subject: help...error....

From: Sean de

Date: 16 Nov, 2010 16:31:03

Message: 2 of 3

"praneeth " <praneeth87@gmail.com> wrote in message <ibuaif$oio$1@fred.mathworks.com>...
> I am using this program
>
> I = imread('eight.tif');
> J = imnoise(I,'salt & pepper',0.02);
> K = medfilt2(J);
> imshow(J), figure, imshow(K)
>
> but Iam getting the following error
> ??? Attempt to execute SCRIPT medfilt2 as a function:
> C:\Users\praneeth\Documents\MATLAB\medfilt2.m

You overwrote the IPT stock function MEDFILT2 with your own function at that location. Change it's name to something else. (This is assuming you have the Image Processing Toolbox)

If you don't have the IPT then
doc function
to explain how to write a function

Subject: help...error....

From: praneeth

Date: 16 Nov, 2010 16:52:04

Message: 3 of 3


> You overwrote the IPT stock function MEDFILT2 with your own function at that location. Change it's name to something else. (This is assuming you have the Image Processing Toolbox)
>
> If you don't have the IPT then
> doc function
> to explain how to write a function



thanx sir........actually I did a mistake......I saved the .m file as medfilt2.m.....now I changed it......its working fine :)

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us