How to find an unknown parameter from a equation fitted to a data-set in MATLAB 2016b ?
Mostra commenti meno recenti
I have a data set for x values and y values.Now I want to solve an unknown parameter n from the equation y=2.t(1-cos(x)(n-1)/(n.p-p(1-cos(x))),where t,p are known.How to write the code to get value of n from the fitted plot? Thanks in advance
Risposta accettata
Più risposte (1)
kowshik Thopalli
il 5 Mar 2017
0 voti
I might be wrong here. If you know all of these values and dont know only n cant you just find n through algebra. I mean solving for n from the equation you have given,I get n as n= ((1-cosx)*(p*y-2*t))/((p*y-2*t(1-cos(x))). and now implementing this in Matlab is trivial.
4 Commenti
SANJIB MAJUMDER
il 5 Mar 2017
kowshik Thopalli
il 5 Mar 2017
I dont see the bigger picture. Why do you have to plot it? If you have only the plot but not x and y you can
h = findobj(gca,'Type','line')
x=get(h,'Xdata')
y=get(h,'Ydata')
do this to get the values of x and y from there you can solve this.
SANJIB MAJUMDER
il 5 Mar 2017
Modificato: John D'Errico
il 5 Mar 2017
kowshik Thopalli
il 5 Mar 2017
Ofcourse.That is expected. As I mentioned in my comment earlier, the code that I gave is for getting data points if you have only the plot and no access to the data points. Since you have the data points this is an parameter estimation problem as pointed out by John
Categorie
Scopri di più su Linear Predictive Coding in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!