필터 지우기
필터 지우기

Optimum Cosine Curve fits an irregular curve

조회 수: 3 (최근 30일)
Asmaa
Asmaa 2011년 9월 26일
I would like to ask about something related to matlab program and I hope you can help.
I drew an irregular curve and I need to fit it with Optimum Cosine Curve, I have searched many in the help files but found nothing!
So I ask for your advice regarding this issue.

답변 (1개)

UJJWAL
UJJWAL 2011년 9월 26일
Hi Asmaa,
In MATLAB there is a curve fitting toolbox that can help you this. Following are the steps :-
a) Open the curve Fitting toolbox.
b)click on DATA...
c) Select the variables in the workspace that represtn the x and y-axis data and then click on create new data set.
d) Now Click on Ok and then click on Fitting... which is next to Data...
e) In the Type of Fit combo box select Custom Equations and then click on New.
f)A New window will open and there select the tab corresponding to General Equations.
g) Corresponding to the dependent variable y type the equation like cos(a*x+b).
h) As you will write the constants like a and b they will appear in the table below. You can also modify their starting points and their upper and lower limits. If you have any idea of these quantities depennding upon the nature of your program and your requirements then change them accordingly or let MATLAB handle the issue. It will just take some extra time.
Now CLick ok to go back to the previous window.
i) Click on Apply. MATLAB will compute the appropriate values of the constants and display them in the same wiundow under the title results. It will show the values of the constants you have provided computed in the least squares sense.
There are many other things you can do like setting the confidence interval etc. If you want to know more leave a msg or mail back.
It is also possible to approach things programmatically but it is a bit messy compared to this method. If this suits you then prefer it. I hope this will assist you . Good Luck
Happy to Help
UJJWAL
  댓글 수: 4
Asmaa
Asmaa 2011년 9월 26일
Thanks am really speechless for your great great great help :) Thanks a lot I did it finally, as am a new user of Matlab!
UJJWAL
UJJWAL 2011년 9월 26일
You will learn. No problem. Anytime :)

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 MATLAB에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by