Clear Filters
Clear Filters

Info

This question is closed. Reopen it to edit or answer.

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

1 view (last 30 days)
Megha
Megha on 24 Nov 2018
Closed: Rik on 24 Nov 2018
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!

Answers (0)

This question is closed.

Community Treasure Hunt

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

Start Hunting!