How to find an unknown parameter from a equation fitted to a data-set in MATLAB 2016b ?
이전 댓글 표시
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
채택된 답변
추가 답변 (1개)
kowshik Thopalli
2017년 3월 5일
0 개 추천
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
SANJIB MAJUMDER
2017년 3월 5일
kowshik Thopalli
2017년 3월 5일
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
2017년 3월 5일
편집: John D'Errico
2017년 3월 5일
kowshik Thopalli
2017년 3월 5일
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
카테고리
도움말 센터 및 File Exchange에서 Linear Predictive Coding에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!