
Plot fitting and equation of El Centro earthquake wave data
10 views (last 30 days)
Show older comments
Ahmad Ibrahim
on 3 May 2016
Answered: suha salman
on 14 Sep 2021
Hello, I need to know how to get the mathematical formula for the set of data points for El Centro earthquake wave [see attached Excel file], I have tried using trend-line of MS Office Excel 365, applying polynomial of 6th order, but the result is not good as the R square value = 0.0006 Please find the attached file, I am looking forward to hearing from you.
Best regards
Ahmad Ibrahim
0 Comments
Accepted Answer
John D'Errico
on 3 May 2016
You must admit, that this is just a bit funny. Before you EVER do anything with your data, PLOT IT FIRST. If you learn nothing else from this exercise, learn that.
quake = xlsread('El_Centro_Data');
plot(quake(:,1),quake(:,2))

Then think about what you see.
Does this seriously look like a polynomial? Polynomials look like straight lines, quadratics, smooth things, nice, smooth curves. Now, look again. Be serious. How ell do you expect a straight line, a quadratic polynomial, or even a 6th order polynomial will fit that data? An R^2 of 0.0006 seems about right.
Don't just throw any random model at any arbitrary set of data and expect anything of value to drop out the end.
A better model for this data than a polynomial might be random noise. Well, not quite. There is some signal there. So you might better concentrate on things like a Fourier transform, since it is designed to extract information from signals like this. Except your data is not equally spaced. But I'd want to look in that direction.
More Answers (1)
See Also
Categories
Find more on Digital Filter Analysis in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!