Azzera filtri
Azzera filtri

Info

Questa domanda è chiusa. Riaprila per modificarla o per rispondere.

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

1 visualizzazione (ultimi 30 giorni)
Megha
Megha il 24 Nov 2018
Chiuso: Rik il 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!

Risposte (0)

Questa domanda è chiusa.

Community Treasure Hunt

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

Start Hunting!

Translated by