How to fit a curve to a power spectrum curve which follows power law

3 次查看(过去 30 天)
How to fit a curve to a power spectrum curve which follows power law

回答(1 个)

Mona Mahboob Kanafi
编辑:Mona Mahboob Kanafi 2013-8-14
Hi,
Go to cftool, then select your data and choose power; set number of terms to '1' if it follows this equation: y = a*x^b
Also you can do this on command window:
f = fit(x,y,'power1');
and then if you want the parameters just use this command:
coefs = coeffvalues(f);

类别

Help CenterFile Exchange 中查找有关 Linear and Nonlinear Regression 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by