Info
此问题已关闭。 请重新打开它进行编辑或回答。
fit a custom equation of the type (sin(Alpha))^n
1 次查看(过去 30 天)
显示 更早的评论
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
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/196388/image.png)
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 个评论
回答(0 个)
此问题已关闭。
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!