sin and cos Regression
Mostrar comentarios más antiguos
If I have an x and y data set and I want to make a sin and cos regression out of them how would I do that. I just want Matlab to plot it out, give me a best fit line, and an equation for the functions. Also I would like an R^2 for the best fit line. How would I do this? note:(I only have the college student version.)
Respuestas (2)
Image Analyst
el 19 de Oct. de 2013
0 votos
Can't you just take the FFT and look for the dominant frequency? I'm not sure what a line means when you are trying to fit a sine wave to some data. Don't you want to find the best sine wave that goes through the data?
2 comentarios
nicholas m.
el 19 de Oct. de 2013
Image Analyst
el 19 de Oct. de 2013
If you want something with more precision, then perhaps he is referring to SSA. See the wikipedia page at http://en.wikipedia.org/wiki/Singular_spectrum_analysis.
abraj ali
el 29 de Sept. de 2018
0 votos
In a single Matlab script, plot a sine wave and cosine wave over one period (0 to 2π). Checkpoints of the requirements: a. Generate your independent variable first; the step size should be no larger than 0.1 so that it has enough samples to get smooth lines. Plot the two waves on the same graph.
1 comentario
Image Analyst
el 29 de Sept. de 2018
I think you meant to start a new question with a "tag" of "homework" because this is not an Answer to nicholas's 5 year old question up at the top.
Categorías
Más información sobre Descriptive Statistics en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!