>> a=imread('test.png');
>> imshow(a)
??? Attempt to call constructor image with incorrect letter case.
Error in ==> basicImageDisplay at 9 hh = image(xdata,ydata,cdata, ...
Error in ==> imshow at 246 hh = basicImageDisplay(fig_handle,ax_handle,...
>>

1 comentario

%this file remove noise from signal using filter
%%simulate noisy signal
Fs = 500;
f = 20;
n = [1/Fs:1/Fs:1];
x = sin(2*pi*f*n);
%add noise to the signal
y = x + rand(1,length(x));
%plot the noisy signal
subplot(3,4,1);plot(n,y);
title('noisy signal');
xlabel('time(s)');
ylabel('amplitude');
%spectral analysis of the signal
L = length(y);
NFFT = 2^nextpow2(L);
y_fft = abs(fft(y,NFFT));
%creating frequency axis
freq = Fs/2*linspace(0,1,NFFT/2+1);
%plot sigle sided amplitude spectrum
subplot(3,4,2);
plot(freq,y_fft(1:NFFT/2+1));
title('single-sided amplitude spectum of y(t)');
xlabel('frequency(Hz)');
ylabel('|y(f)|');
%%design filter and apply on the sequence.
o = 5;
wn = [3 7]*2/Fs;
[b,a] = butter(o,wn,'bandpass');
%see frequency response of the filter
[h,w] = freqz(b,a,1024,Fs);
subplot(3,4,3);
plot(w,20*log10(abs(h)));
title('magnitude response of the filter');
xlabel('frequency(Hz)');
ylabel('magnitude');grid on;
%filter the signal
y_filt = filter(b,a,y);
subplot(3,4,4);
plot(n,y_filt);
title('filtered signal');
xlabel('time(s)');
ylabel('amplitude');
By Executing this programe the error occurs like the following.how can it will be error free and give output ,kindly suggest me.
removenoise
Error using subplot (line 109)
Attempt to call constructor handle with incorrect letter case.
Error in removenoise (line 10)
subplot(3,4,1);plot(n,y);

Iniciar sesión para comentar.

 Respuesta aceptada

Walter Roberson
Walter Roberson el 23 de En. de 2014

0 votos

Somewhere in your MATLAB path, you have your own routine that has the same name as one of the internal MATLAB graphic routines.

6 comentarios

Shaila parvin
Shaila parvin el 24 de En. de 2014
What Can I do now?
Please help me!!
Walter Roberson
Walter Roberson el 24 de En. de 2014
Which .m files do you have in your working directory (or other directories of your files that you have added to the MATLAB path) ?
Shaila parvin
Shaila parvin el 24 de En. de 2014
I've 2 .m files on the working directory. They are: "test.m" and "image.m"
What I have to do?
Shaila parvin
Shaila parvin el 24 de En. de 2014
I've the same names on the other directories that I've added to the current directory. May I need to rename them?
Walter Roberson
Walter Roberson el 24 de En. de 2014
You need to rename image.m to something else.
Tesfatsiyon Mehale
Tesfatsiyon Mehale el 3 de Dic. de 2018
Yap it's Good answer . I did it

Iniciar sesión para comentar.

Más respuestas (1)

Tesfatsiyon Mehale
Tesfatsiyon Mehale el 3 de Dic. de 2018

0 votos

In current folder path on Matlab that mean your default matlab file save path and check the file name image.m and remove it . after that it will be working .

Categorías

Más información sobre MATLAB en Centro de ayuda y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by