Info

この質問は閉じられています。 編集または回答するには再度開いてください。

fit a custom equation of the type (sin(Alpha))^n

1 回表示 (過去 30 日間)
Megha
Megha 2018 年 11 月 24 日
閉鎖済み: Rik 2018 年 11 月 24 日
I have X = [5.29 15.8 26.47 37.05 47.64 58.23 68.82 79.41 90 100.58 111.17 121.76 132.35 142.94 153.52 164.11 174.7];
and Y = [0.25 0.20 0.17 0.187 0.229 0.385 0.63 0.97 1 0.89 0.67 0.42 0.24 0.18 0.16 0.24 0.30]
I would like to fit only and only sin "" equation to this data. Here, I make it claer that I do not want polyfit. Moreover, I also
want to find the value of "n" for which the equation fits the best.
This may go like,
plot(X,Y);
hold on;
for n = -2:0.1:2
Curve = fit(X,Y,'(sin(X)).^n')
end
However, this does not work. Any help!

回答 (0 件)

この質問は閉じられています。

Community Treasure Hunt

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

Start Hunting!

Translated by