SlideShare a Scribd company logo
DSP Project
Project Done By
Istiak Mahmood Ayon
ID: 021101005
Shahrin Ahammad Shetu
ID: 021101027
Sonar is a technique that uses sound propagation to navigate,
communicate with or detect objects on or under the surface of the water.
 Sonar uses a sound transmitter and a receiver.
Sonar creates a pulse of sound, and then listens
for the reflections (echo) of the pulse. To
measure the distance to an object, the time
from transmission of a pulse to reception is
measured and converted into a range (distance)
by knowing the speed of sound.
In this project we are given two Sonar signals (transmitted signal x(n) and
received signal y(n) . At first the received signal y(n) is passed through a
band pass filter to remove noise and interference. Then, the filtered signal is
cross-correlated with the transmitted signal x(n) to find the lag for the
maximum similarity. From this lag L, the distance of the object can be
estimated.
x(n)
y(n) y2(n)
Band Pass Filter Cross
Correlation
Lag, L
Transmitted signal x(n)
The Fast Fourier of the transmitted signal x(n).
1) Magnitude response (dB)
2) Phase response (degree)
Received signal y(n).
1) Magnitude response (dB)
2) Phase response (degree)
The Fast Fourier of the received signal y(n).
For filtering the receive signal y(n), as it has noise and interference of
other sound sources .
Frequency response of Bandpass IIR (Chebyshev-1) filter.
Impulse response:
Impulse response of Bandpass IIR (Chebyshev-1) filter
y2 is the signal that we gain from filtering the
received signal y(n).
The Fast Fourier of the received signal y2.
1) Magnitude response (dB)
2) Phase response (degree)
The filtered signal is cross-correlated with the transmitted signal x(n)
to find the lag for the maximum similarity. From this lag L, the
distance of the object can be estimated.
Here
r=distance of the object.
t=time between the transmission and reception.
v=velocity of sound (in water).
L=Lag
Distance, r = v*t/2
Given
Sampling frequency Fs = 10KHz
Velocity of sound in water is v = 1,481m/s.
The time between transmission and reception can be
calculated from the lag L (t=L/Fs).
Code for distance measurement:
L=1.21*10^4;
Fs=10^4;
t=L/Fs;
v=1481;
r=(v*t)/2
Ans:
The distance ‘r’ is :-
r =
896.0050
 clc;
 plot(x) %Plot of transmitted signal x(n)
 figure,freqz(x) %Frequency response of x(n)
 X=fft(x);
 figure,plot(abs(X))
 figure,plot(y) %Plot of received signal y(n)
 figure,freqz(y) %Frequency response of y(n)
 Y=fft(y);
 figure,plot(abs(Y))
 [b,a]=SOS2tf(SOS,G);
 y2=filter(b,a,y); %filter calling.
 figure,plot(y2) % plot of filtered signal y2(n)
 figure,freqz(y2) %Frequency response of y(n)
 Y2=fft(y2);
 figure,plot(abs(Y2))
 n0=1:length(x); % cross co-relation of transmitted
 n2=1:length(y2); % signal x(n) and filtered signal y2(n)
 [x1,n1]=sigfold(x,n0);
 [z,n]=conv_m(x1,n1,y2,n2);
 figure,plot(n,z)
Sonar application (DSP)

More Related Content

What's hot

Double Side band Suppressed carrier (DSB-SC) Modulation and Demodulation.
 Double Side band Suppressed carrier (DSB-SC) Modulation and Demodulation. Double Side band Suppressed carrier (DSB-SC) Modulation and Demodulation.
Double Side band Suppressed carrier (DSB-SC) Modulation and Demodulation.
SAiFul IslAm
 
SAMPLING & RECONSTRUCTION OF DISCRETE TIME SIGNAL
SAMPLING & RECONSTRUCTION  OF DISCRETE TIME SIGNALSAMPLING & RECONSTRUCTION  OF DISCRETE TIME SIGNAL
SAMPLING & RECONSTRUCTION OF DISCRETE TIME SIGNAL
karan sati
 
Multirate DSP
Multirate DSPMultirate DSP
Multirate DSP
@zenafaris91
 
Directional couplers 22
Directional couplers 22Directional couplers 22
Directional couplers 22
HIMANSHU DIWAKAR
 
Radar presentation
Radar presentation Radar presentation
Radar presentation
عبدالله صقر
 
Fir filter_utkarsh_kulshrestha
Fir filter_utkarsh_kulshresthaFir filter_utkarsh_kulshrestha
Fir filter_utkarsh_kulshrestha
Utkarsh Kulshrestha
 
CommunicatSystems_basic ppt.pdf
CommunicatSystems_basic ppt.pdfCommunicatSystems_basic ppt.pdf
CommunicatSystems_basic ppt.pdf
ArunKumar674066
 
NYQUIST CRITERION FOR ZERO ISI
NYQUIST CRITERION FOR ZERO ISINYQUIST CRITERION FOR ZERO ISI
NYQUIST CRITERION FOR ZERO ISI
FAIZAN SHAFI
 
Matched filter
Matched filterMatched filter
Matched filter
srkrishna341
 
Antenna arrays
Antenna arraysAntenna arrays
Antenna arrays
AJAL A J
 
Adaptive filter
Adaptive filterAdaptive filter
Adaptive filter
A. Shamel
 
Multirate DSP
Multirate DSPMultirate DSP
Multirate DSP
@zenafaris91
 
Sonar technology ppt
Sonar technology pptSonar technology ppt
Sonar technology ppt
Richa Tripathi
 
DSP_2018_FOEHU - Lec 07 - IIR Filter Design
DSP_2018_FOEHU - Lec 07 - IIR Filter DesignDSP_2018_FOEHU - Lec 07 - IIR Filter Design
DSP_2018_FOEHU - Lec 07 - IIR Filter Design
Amr E. Mohamed
 
Introduction to DSP.ppt
Introduction to DSP.pptIntroduction to DSP.ppt
Introduction to DSP.ppt
Dr.YNM
 
Chebyshev filter
Chebyshev filterChebyshev filter
Chebyshev filter
MOHAMMAD AKRAM
 
Equalization
EqualizationEqualization
Equalization
@zenafaris91
 
Adaptive filter
Adaptive filterAdaptive filter
Adaptive filter
Vijay Kumar
 
Coherent systems
Coherent systemsCoherent systems
Coherent systems
CKSunith1
 
Signal Filtering
Signal FilteringSignal Filtering
Signal Filtering
Imane Haf
 

What's hot (20)

Double Side band Suppressed carrier (DSB-SC) Modulation and Demodulation.
 Double Side band Suppressed carrier (DSB-SC) Modulation and Demodulation. Double Side band Suppressed carrier (DSB-SC) Modulation and Demodulation.
Double Side band Suppressed carrier (DSB-SC) Modulation and Demodulation.
 
SAMPLING & RECONSTRUCTION OF DISCRETE TIME SIGNAL
SAMPLING & RECONSTRUCTION  OF DISCRETE TIME SIGNALSAMPLING & RECONSTRUCTION  OF DISCRETE TIME SIGNAL
SAMPLING & RECONSTRUCTION OF DISCRETE TIME SIGNAL
 
Multirate DSP
Multirate DSPMultirate DSP
Multirate DSP
 
Directional couplers 22
Directional couplers 22Directional couplers 22
Directional couplers 22
 
Radar presentation
Radar presentation Radar presentation
Radar presentation
 
Fir filter_utkarsh_kulshrestha
Fir filter_utkarsh_kulshresthaFir filter_utkarsh_kulshrestha
Fir filter_utkarsh_kulshrestha
 
CommunicatSystems_basic ppt.pdf
CommunicatSystems_basic ppt.pdfCommunicatSystems_basic ppt.pdf
CommunicatSystems_basic ppt.pdf
 
NYQUIST CRITERION FOR ZERO ISI
NYQUIST CRITERION FOR ZERO ISINYQUIST CRITERION FOR ZERO ISI
NYQUIST CRITERION FOR ZERO ISI
 
Matched filter
Matched filterMatched filter
Matched filter
 
Antenna arrays
Antenna arraysAntenna arrays
Antenna arrays
 
Adaptive filter
Adaptive filterAdaptive filter
Adaptive filter
 
Multirate DSP
Multirate DSPMultirate DSP
Multirate DSP
 
Sonar technology ppt
Sonar technology pptSonar technology ppt
Sonar technology ppt
 
DSP_2018_FOEHU - Lec 07 - IIR Filter Design
DSP_2018_FOEHU - Lec 07 - IIR Filter DesignDSP_2018_FOEHU - Lec 07 - IIR Filter Design
DSP_2018_FOEHU - Lec 07 - IIR Filter Design
 
Introduction to DSP.ppt
Introduction to DSP.pptIntroduction to DSP.ppt
Introduction to DSP.ppt
 
Chebyshev filter
Chebyshev filterChebyshev filter
Chebyshev filter
 
Equalization
EqualizationEqualization
Equalization
 
Adaptive filter
Adaptive filterAdaptive filter
Adaptive filter
 
Coherent systems
Coherent systemsCoherent systems
Coherent systems
 
Signal Filtering
Signal FilteringSignal Filtering
Signal Filtering
 

Viewers also liked

Medical applications of dsp
Medical applications of dspMedical applications of dsp
Medical applications of dsp
kanusinghal3
 
Dsp application on mobile communication
Dsp application on mobile communicationDsp application on mobile communication
Dsp application on mobile communication
Keval Patel
 
Applications of Digital image processing in Medical Field
Applications of Digital image processing in Medical FieldApplications of Digital image processing in Medical Field
Applications of Digital image processing in Medical Field
Ashwani Srivastava
 
Applications of digital signal processing
Applications of digital signal processing Applications of digital signal processing
Applications of digital signal processing Rajeev Piyare
 
Dsp ppt
Dsp pptDsp ppt
Dsp ppt
Sushant Burde
 
Dsp
DspDsp
Radar and sonar subbu
Radar and sonar subbuRadar and sonar subbu
Radar and sonar subbu
subrahmanyam Subbu
 
Sonar
SonarSonar
SONAR
SONARSONAR
Radar signal processing
Radar signal processingRadar signal processing
Radar signal processing
Mustahid Ali
 
Digital signal processing
Digital signal processingDigital signal processing
Digital signal processing
Vedavyas PBurli
 
RADAR AND ANTENNA
RADAR AND ANTENNARADAR AND ANTENNA
RADAR AND ANTENNA
Sharifah Hamzah
 
Digital Signal Processors - DSP's
Digital Signal Processors - DSP'sDigital Signal Processors - DSP's
Digital Signal Processors - DSP's
Hicham Berkouk
 
Dft and its applications
Dft and its applicationsDft and its applications
Dft and its applications
Agam Goel
 
presentation on digital signal processing
presentation on digital signal processingpresentation on digital signal processing
presentation on digital signal processing
sandhya jois
 
Fields of digital image processing slides
Fields of digital image processing slidesFields of digital image processing slides
Fields of digital image processing slides
Srinath Dhayalamoorthy
 
emka TECHNOLOGIES - Telemetry - OPT nibp system
emka TECHNOLOGIES - Telemetry - OPT nibp systememka TECHNOLOGIES - Telemetry - OPT nibp system
emka TECHNOLOGIES - Telemetry - OPT nibp system
emka TECHNOLOGIES
 
DIGITAL SIGNAL PROCESSING
DIGITAL SIGNAL PROCESSINGDIGITAL SIGNAL PROCESSING
DIGITAL SIGNAL PROCESSING
Snehal Hedau
 
Medical image analysis
Medical image analysisMedical image analysis
Medical image analysis
Aboul Ella Hassanien
 
Introduction to Digital Signal Processing
Introduction to Digital Signal ProcessingIntroduction to Digital Signal Processing
Introduction to Digital Signal Processing
op205
 

Viewers also liked (20)

Medical applications of dsp
Medical applications of dspMedical applications of dsp
Medical applications of dsp
 
Dsp application on mobile communication
Dsp application on mobile communicationDsp application on mobile communication
Dsp application on mobile communication
 
Applications of Digital image processing in Medical Field
Applications of Digital image processing in Medical FieldApplications of Digital image processing in Medical Field
Applications of Digital image processing in Medical Field
 
Applications of digital signal processing
Applications of digital signal processing Applications of digital signal processing
Applications of digital signal processing
 
Dsp ppt
Dsp pptDsp ppt
Dsp ppt
 
Dsp
DspDsp
Dsp
 
Radar and sonar subbu
Radar and sonar subbuRadar and sonar subbu
Radar and sonar subbu
 
Sonar
SonarSonar
Sonar
 
SONAR
SONARSONAR
SONAR
 
Radar signal processing
Radar signal processingRadar signal processing
Radar signal processing
 
Digital signal processing
Digital signal processingDigital signal processing
Digital signal processing
 
RADAR AND ANTENNA
RADAR AND ANTENNARADAR AND ANTENNA
RADAR AND ANTENNA
 
Digital Signal Processors - DSP's
Digital Signal Processors - DSP'sDigital Signal Processors - DSP's
Digital Signal Processors - DSP's
 
Dft and its applications
Dft and its applicationsDft and its applications
Dft and its applications
 
presentation on digital signal processing
presentation on digital signal processingpresentation on digital signal processing
presentation on digital signal processing
 
Fields of digital image processing slides
Fields of digital image processing slidesFields of digital image processing slides
Fields of digital image processing slides
 
emka TECHNOLOGIES - Telemetry - OPT nibp system
emka TECHNOLOGIES - Telemetry - OPT nibp systememka TECHNOLOGIES - Telemetry - OPT nibp system
emka TECHNOLOGIES - Telemetry - OPT nibp system
 
DIGITAL SIGNAL PROCESSING
DIGITAL SIGNAL PROCESSINGDIGITAL SIGNAL PROCESSING
DIGITAL SIGNAL PROCESSING
 
Medical image analysis
Medical image analysisMedical image analysis
Medical image analysis
 
Introduction to Digital Signal Processing
Introduction to Digital Signal ProcessingIntroduction to Digital Signal Processing
Introduction to Digital Signal Processing
 

Similar to Sonar application (DSP)

S14._WaveMotion.ppt
S14._WaveMotion.pptS14._WaveMotion.ppt
S14._WaveMotion.ppt
ssuser61f95d
 
Lecture22
Lecture22Lecture22
Lecture22
nomio0703
 
Lecture22
Lecture22Lecture22
Lecture22
oyunbileg06
 
Medical Equipment Section1
Medical Equipment Section1Medical Equipment Section1
Medical Equipment Section1
cairo university
 
Physics by Younes Sina
Physics by Younes SinaPhysics by Younes Sina
Physics by Younes Sina
Younes Sina
 
Sonar system
Sonar systemSonar system
Sonar system
Arvin Moeini
 
Doppler effect
Doppler effectDoppler effect
Doppler effect
Ramzee Small
 
ddopllhshdhdhshshsjsjdjjdjdjdjdhsher.pptx
ddopllhshdhdhshshsjsjdjjdjdjdjdhsher.pptxddopllhshdhdhshshsjsjdjjdjdjdjdhsher.pptx
ddopllhshdhdhshshsjsjdjjdjdjdjdhsher.pptx
vishalharvara0
 
Waves
WavesWaves
Exp SPA - Chp 15 Sound
Exp SPA - Chp 15 SoundExp SPA - Chp 15 Sound
Exp SPA - Chp 15 Sound
harrywwh
 
201241723 mz mandhlazi
201241723 mz mandhlazi201241723 mz mandhlazi
201241723 mz mandhlazi
University Of Johannesburg
 
04 UNIT-4 (WAVES) .pptx
04 UNIT-4 (WAVES) .pptx04 UNIT-4 (WAVES) .pptx
04 UNIT-4 (WAVES) .pptx
FatimaAfzal56
 
Doppler Effect
Doppler EffectDoppler Effect
Doppler Effect
Nusirat Adedewe
 
Doppler Effect - Ultrasound
Doppler Effect - UltrasoundDoppler Effect - Ultrasound
Doppler Effect - Ultrasound
Victor Ekpo
 
Presentation on Noise from Analog Communication
Presentation on Noise from Analog CommunicationPresentation on Noise from Analog Communication
Presentation on Noise from Analog Communication
SandeepPadmakar
 
201241723 mz mandhlazi
201241723 mz mandhlazi201241723 mz mandhlazi
201241723 mz mandhlazi
University Of Johannesburg
 
Phys12
Phys12Phys12
Phys12
Panji Resi
 
Doppler
DopplerDoppler
ULTRASOUND IMAGING PRINCIPLES
ULTRASOUND IMAGING PRINCIPLESULTRASOUND IMAGING PRINCIPLES
ULTRASOUND IMAGING PRINCIPLES
INDIA ULTRASOUND
 
Slide Handouts with Notes
Slide Handouts with NotesSlide Handouts with Notes
Slide Handouts with Notes
Leon Nguyen
 

Similar to Sonar application (DSP) (20)

S14._WaveMotion.ppt
S14._WaveMotion.pptS14._WaveMotion.ppt
S14._WaveMotion.ppt
 
Lecture22
Lecture22Lecture22
Lecture22
 
Lecture22
Lecture22Lecture22
Lecture22
 
Medical Equipment Section1
Medical Equipment Section1Medical Equipment Section1
Medical Equipment Section1
 
Physics by Younes Sina
Physics by Younes SinaPhysics by Younes Sina
Physics by Younes Sina
 
Sonar system
Sonar systemSonar system
Sonar system
 
Doppler effect
Doppler effectDoppler effect
Doppler effect
 
ddopllhshdhdhshshsjsjdjjdjdjdjdhsher.pptx
ddopllhshdhdhshshsjsjdjjdjdjdjdhsher.pptxddopllhshdhdhshshsjsjdjjdjdjdjdhsher.pptx
ddopllhshdhdhshshsjsjdjjdjdjdjdhsher.pptx
 
Waves
WavesWaves
Waves
 
Exp SPA - Chp 15 Sound
Exp SPA - Chp 15 SoundExp SPA - Chp 15 Sound
Exp SPA - Chp 15 Sound
 
201241723 mz mandhlazi
201241723 mz mandhlazi201241723 mz mandhlazi
201241723 mz mandhlazi
 
04 UNIT-4 (WAVES) .pptx
04 UNIT-4 (WAVES) .pptx04 UNIT-4 (WAVES) .pptx
04 UNIT-4 (WAVES) .pptx
 
Doppler Effect
Doppler EffectDoppler Effect
Doppler Effect
 
Doppler Effect - Ultrasound
Doppler Effect - UltrasoundDoppler Effect - Ultrasound
Doppler Effect - Ultrasound
 
Presentation on Noise from Analog Communication
Presentation on Noise from Analog CommunicationPresentation on Noise from Analog Communication
Presentation on Noise from Analog Communication
 
201241723 mz mandhlazi
201241723 mz mandhlazi201241723 mz mandhlazi
201241723 mz mandhlazi
 
Phys12
Phys12Phys12
Phys12
 
Doppler
DopplerDoppler
Doppler
 
ULTRASOUND IMAGING PRINCIPLES
ULTRASOUND IMAGING PRINCIPLESULTRASOUND IMAGING PRINCIPLES
ULTRASOUND IMAGING PRINCIPLES
 
Slide Handouts with Notes
Slide Handouts with NotesSlide Handouts with Notes
Slide Handouts with Notes
 

More from Shahrin Ahammad

Thesis presentation raeeda
Thesis presentation raeedaThesis presentation raeeda
Thesis presentation raeeda
Shahrin Ahammad
 
Basic of 3 g technologies (digi lab_project).pptx [repaired]
Basic of 3 g technologies (digi lab_project).pptx [repaired]Basic of 3 g technologies (digi lab_project).pptx [repaired]
Basic of 3 g technologies (digi lab_project).pptx [repaired]
Shahrin Ahammad
 
CV_of_Shahrin_Ahammad_Shetu
CV_of_Shahrin_Ahammad_ShetuCV_of_Shahrin_Ahammad_Shetu
CV_of_Shahrin_Ahammad_Shetu
Shahrin Ahammad
 
8x8 dot matrix(project)
8x8 dot matrix(project)8x8 dot matrix(project)
8x8 dot matrix(project)
Shahrin Ahammad
 
UIU Network System(Cn project)
UIU Network System(Cn project)UIU Network System(Cn project)
UIU Network System(Cn project)
Shahrin Ahammad
 
Amplitude, Frequency, Pulse code modulation and Demodulation (com. lab)
Amplitude, Frequency, Pulse code modulation and Demodulation (com. lab)Amplitude, Frequency, Pulse code modulation and Demodulation (com. lab)
Amplitude, Frequency, Pulse code modulation and Demodulation (com. lab)
Shahrin Ahammad
 

More from Shahrin Ahammad (6)

Thesis presentation raeeda
Thesis presentation raeedaThesis presentation raeeda
Thesis presentation raeeda
 
Basic of 3 g technologies (digi lab_project).pptx [repaired]
Basic of 3 g technologies (digi lab_project).pptx [repaired]Basic of 3 g technologies (digi lab_project).pptx [repaired]
Basic of 3 g technologies (digi lab_project).pptx [repaired]
 
CV_of_Shahrin_Ahammad_Shetu
CV_of_Shahrin_Ahammad_ShetuCV_of_Shahrin_Ahammad_Shetu
CV_of_Shahrin_Ahammad_Shetu
 
8x8 dot matrix(project)
8x8 dot matrix(project)8x8 dot matrix(project)
8x8 dot matrix(project)
 
UIU Network System(Cn project)
UIU Network System(Cn project)UIU Network System(Cn project)
UIU Network System(Cn project)
 
Amplitude, Frequency, Pulse code modulation and Demodulation (com. lab)
Amplitude, Frequency, Pulse code modulation and Demodulation (com. lab)Amplitude, Frequency, Pulse code modulation and Demodulation (com. lab)
Amplitude, Frequency, Pulse code modulation and Demodulation (com. lab)
 

Sonar application (DSP)

  • 1. DSP Project Project Done By Istiak Mahmood Ayon ID: 021101005 Shahrin Ahammad Shetu ID: 021101027
  • 2. Sonar is a technique that uses sound propagation to navigate, communicate with or detect objects on or under the surface of the water.
  • 3.  Sonar uses a sound transmitter and a receiver. Sonar creates a pulse of sound, and then listens for the reflections (echo) of the pulse. To measure the distance to an object, the time from transmission of a pulse to reception is measured and converted into a range (distance) by knowing the speed of sound.
  • 4. In this project we are given two Sonar signals (transmitted signal x(n) and received signal y(n) . At first the received signal y(n) is passed through a band pass filter to remove noise and interference. Then, the filtered signal is cross-correlated with the transmitted signal x(n) to find the lag for the maximum similarity. From this lag L, the distance of the object can be estimated. x(n) y(n) y2(n) Band Pass Filter Cross Correlation Lag, L
  • 6. The Fast Fourier of the transmitted signal x(n).
  • 7. 1) Magnitude response (dB) 2) Phase response (degree)
  • 9. 1) Magnitude response (dB) 2) Phase response (degree)
  • 10. The Fast Fourier of the received signal y(n).
  • 11. For filtering the receive signal y(n), as it has noise and interference of other sound sources .
  • 12. Frequency response of Bandpass IIR (Chebyshev-1) filter.
  • 13. Impulse response: Impulse response of Bandpass IIR (Chebyshev-1) filter
  • 14. y2 is the signal that we gain from filtering the received signal y(n).
  • 15. The Fast Fourier of the received signal y2.
  • 16. 1) Magnitude response (dB) 2) Phase response (degree)
  • 17. The filtered signal is cross-correlated with the transmitted signal x(n) to find the lag for the maximum similarity. From this lag L, the distance of the object can be estimated.
  • 18. Here r=distance of the object. t=time between the transmission and reception. v=velocity of sound (in water). L=Lag Distance, r = v*t/2 Given Sampling frequency Fs = 10KHz Velocity of sound in water is v = 1,481m/s. The time between transmission and reception can be calculated from the lag L (t=L/Fs).
  • 19. Code for distance measurement: L=1.21*10^4; Fs=10^4; t=L/Fs; v=1481; r=(v*t)/2 Ans: The distance ‘r’ is :- r = 896.0050
  • 20.  clc;  plot(x) %Plot of transmitted signal x(n)  figure,freqz(x) %Frequency response of x(n)  X=fft(x);  figure,plot(abs(X))  figure,plot(y) %Plot of received signal y(n)  figure,freqz(y) %Frequency response of y(n)  Y=fft(y);  figure,plot(abs(Y))  [b,a]=SOS2tf(SOS,G);  y2=filter(b,a,y); %filter calling.  figure,plot(y2) % plot of filtered signal y2(n)  figure,freqz(y2) %Frequency response of y(n)  Y2=fft(y2);  figure,plot(abs(Y2))  n0=1:length(x); % cross co-relation of transmitted  n2=1:length(y2); % signal x(n) and filtered signal y2(n)  [x1,n1]=sigfold(x,n0);  [z,n]=conv_m(x1,n1,y2,n2);  figure,plot(n,z)