How Do the "fittype" function works

조회 수: 5 (최근 30일)
somnath
somnath 2015년 8월 10일
댓글: somnath 2015년 8월 10일
I am working on a project where I have got a piece of code where the fittype function has been used like this
ft = fittype( 'cconv(A.*exp(-x.*B), y,length(x))' , 'independent', {'x', 'y'}, 'dependent', 'z' );
where the circuler convolution is beeing done with two vectors A and B . My query is where the values of A and B comes from or how the values are beeing initialized .
  댓글 수: 2
Arun Badigannavar
Arun Badigannavar 2015년 8월 10일
Please elaborate your question, A, B depends on vector you choose,
somnath
somnath 2015년 8월 10일
Actually ai am studying a piece of code and After the fittype function the "fit" function is called , I want to know how the cconv((A.*exp(-x.*B), y,length(x)) function is called and A and B are estimated.

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

답변 (1개)

Walter Roberson
Walter Roberson 2015년 8월 10일
fittype() does not initialize A or B in your example. fittype() creates a model that includes an anonymous function that will name A and B as parameters. Usually the fit() function is then used to determine the parameters, so what you want to know is how it initializes the values.
If no start points (the default value of an empty vector) are passed to the fit function, starting points for some library models are determined heuristically. For rational and Weibull models, and all custom nonlinear models, the toolbox selects default initial values for coefficients uniformly at random from the interval (0,1).
Yours is a custom nonlinear model.
  댓글 수: 1
somnath
somnath 2015년 8월 10일
Thankyou very much . Now I got how the coeefs are initialized . Can you please help me understand how the circulerconvolution(with the function cconv()) is beeing done.

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

카테고리

Help CenterFile Exchange에서 Linear and Nonlinear Regression에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by