Model fit using fminunc based on measured data
이전 댓글 표시
Hi all,
I have measurement data that I would like to use to fit a model. I want to use the command "fminunc" for the fit, as I will later have a model with several coefficients (9) and variables (5). However, in order to get my script to run at all, I have reduced it and you can find it below as a minimal example.
These coefficients (in my minimal example these are A0 and EA) are to be fitted in such a way that the function including these fitted coefficients represents the entire result of my experiments as best as possible (each coefficient is a constant for the entire experimental data set). In my minimal example, I had four test runs at different temperatures (x1), which resulted in different lifetimes (x2).
Code:
kB = 8.617 * 1e-5; % in eV/K
x1 = [233; 264; 295; 326]; % temperatures
x2 = [420000; 970000; 3800000; 10000000]; % lifetimes
% Function to solve
x0 = [2.7 * 1e10, 0.220]; % initial values
% Solve
However, I only get an error message. Can anyone help me find out where my error is?
Many thanks in advance!
BR, Seb
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Optimization Toolbox에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
