Math Help Forum

Math Help Forum Feed Site Feed

Go Back   Math Help Forum > Math Resources > Mathematics Software Discussion
Reply
 
Thread Tools Display Modes
  #1  
Old November 2nd, 2009, 03:46 PM
Newbie
 
Join Date: Nov 2009
Posts: 2
Country:
Thanks: 0
Thanked 0 Times in 0 Posts
ixie99 is on a distinguished road
Default Some Matlab Help

Hi all. I am new here. I though this would be a good place to ask for some help with my Matlab assignment, because i am completely lost.

I need to explore the detection of a signal in the presence of noise, the signal being the first 90 degrees of a sine wave. I need to analyze how good a fit of a polynomial with order and degree as a function increasing noise.

Using an appropriate range of signal to noise ratios, i need to construct the signal for 10 different signal to noise ratios ranging from 10:1 to 0.1:1. I need to generate polynomial fits to the data ranging from order 1 to order 4.

The last part is to calculate the residuals for each combination and demonstrate when a higher order fit is better than a linear fit.

I really need help on this. Any amount will do.
Thanks
Reply With Quote
Advertisement
 
  #2  
Old November 2nd, 2009, 04:31 PM
Member
 
Join Date: Mar 2007
Posts: 143
Country:
Thanks: 20
Thanked 21 Times in 20 Posts
elbarto is on a distinguished road
Default

Try polyfit and polyeval.

Code:
EDU>> x = sort(rand(1,5))

x =

    0.4456    0.4898    0.6463    0.7094    0.7547

EDU>> y = rand(1,5)

y =

    0.2760    0.6797    0.6551    0.1626    0.1190

EDU>> p = polyfit(x,y,4)

p =

  1.0e+003 *

    1.0569   -2.3779    1.9403   -0.6777    0.0857

EDU>> yp=polyval(p,x)

yp =

    0.2760    0.6797    0.6551    0.1626    0.1190

EDU>> plot(x,y,'o',x,yp,'k:')
EDU>>
Elbarto
Reply With Quote
  #3  
Old November 2nd, 2009, 04:41 PM
Newbie
 
Join Date: Nov 2009
Posts: 2
Country:
Thanks: 0
Thanked 0 Times in 0 Posts
ixie99 is on a distinguished road
Default

Quote:
Originally Posted by elbarto View Post
Try polyfit and polyeval.

Code:
EDU>> x = sort(rand(1,5))

x =

    0.4456    0.4898    0.6463    0.7094    0.7547

EDU>> y = rand(1,5)

y =

    0.2760    0.6797    0.6551    0.1626    0.1190

EDU>> p = polyfit(x,y,4)

p =

  1.0e+003 *

    1.0569   -2.3779    1.9403   -0.6777    0.0857

EDU>> yp=polyval(p,x)

yp =

    0.2760    0.6797    0.6551    0.1626    0.1190

EDU>> plot(x,y,'o',x,yp,'k:')
EDU>>
Elbarto
Thank you for your help. I understand most of the polyfit and polyval code. What troubles me the most right now is
"Using an appropriate range of signal to noise ratios, i need to construct the signal for 10 different signal to noise ratios ranging from 10:1 to 0.1:1. I need to generate polynomial fits to the data ranging from order 1 to order 4."
I am not sure how to construct the signal and i am lost with the signal to noise ratio.
Reply With Quote
  #4  
Old November 2nd, 2009, 05:42 PM
Member
 
Join Date: Mar 2007
Posts: 143
Country:
Thanks: 20
Thanked 21 Times in 20 Posts
elbarto is on a distinguished road
Default

I cant help you out much there I am afraid. Do you have the signal processing toolbox installed?

Code:
EDU>> ver
will tell you what toolboxes you have available.

Something on this page might be of use Signal Processing Toolbox

Elbarto
Reply With Quote
  #5  
Old November 2nd, 2009, 09:40 PM
CaptainBlack's Avatar
Grand Panjandrum
 
Join Date: Nov 2005
Location: South of England
Posts: 12,279
Country:
Thanks: 779
Thanked 4,004 Times in 3,229 Posts
CaptainBlack has a reputation beyond reputeCaptainBlack has a reputation beyond reputeCaptainBlack has a reputation beyond reputeCaptainBlack has a reputation beyond reputeCaptainBlack has a reputation beyond reputeCaptainBlack has a reputation beyond reputeCaptainBlack has a reputation beyond reputeCaptainBlack has a reputation beyond reputeCaptainBlack has a reputation beyond reputeCaptainBlack has a reputation beyond reputeCaptainBlack has a reputation beyond repute
Default

Quote:
Originally Posted by ixie99 View Post
Hi all. I am new here. I though this would be a good place to ask for some help with my Matlab assignment, because i am completely lost.

I need to explore the detection of a signal in the presence of noise, the signal being the first 90 degrees of a sine wave. I need to analyze how good a fit of a polynomial with order and degree as a function increasing noise.

Using an appropriate range of signal to noise ratios, i need to construct the signal for 10 different signal to noise ratios ranging from 10:1 to 0.1:1. I need to generate polynomial fits to the data ranging from order 1 to order 4.

The last part is to calculate the residuals for each combination and demonstrate when a higher order fit is better than a linear fit.

I really need help on this. Any amount will do.
Thanks
You need to tell us something more about the noise, like its bandwidth .. Or about the signal sampling, or ...

CB
__________________
Truth does not change because it is, or is not, believed by a majority of the people.

Giordano Bruno
Reply With Quote
  #6  
Old November 10th, 2009, 09:28 AM
Newbie
 
Join Date: Nov 2009
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
gaby99 is on a distinguished road
Default

Is that an online program. I nver heard of it
Reply With Quote
  #7  
Old November 10th, 2009, 04:28 PM
Member
 
Join Date: Mar 2007
Posts: 143
Country:
Thanks: 20
Thanked 21 Times in 20 Posts
elbarto is on a distinguished road
Default

Is what an online program?

If you are talking about the signal processing toolbox then it is an optional feature of MATLAB that comes with the recent student versions. I am using 2008b an I have this toolbox available on my install.


Elbarto
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off
Forum Jump


All times are GMT -7. The time now is 08:28 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0 ©2008, Crawlability, Inc.
©2005 - 2009 Math Help Forum


Math Help Forum is a community of maths forums with an emphasis on maths help in all levels of mathematics.
Register to post your math questions or just hang out and try some of our math games or visit the arcade.