Fitting curve : difficultu to do the modelized

3 ビュー (過去 30 日間)
Rémi MOREAU
Rémi MOREAU 2019 年 8 月 30 日
コメント済み: Rémi MOREAU 2019 年 8 月 30 日
Hello
I use for the first time the trial version of Maltlab to test it before buy it. I thought that it will be more simple for modelize.
I collected data with some pressure recorders and I want to know the equation about the all data.
At this time , for each data recorder, I used Excel to put my data and I drew. After, I used the modelisation (poly, linear, exp, ...) and I asked the equation => It's very simple.
Because I have a result with my data recorder than I cannot have the equation with Excel, I decide to test Matlab.
I sucessed to download my data (collected directly by Excel), I successed to plot but how can I have the equation ?. I Itried to test fitting curv but impossible to understand.
Thanks
Regards,
RM
  4 件のコメント
Star Strider
Star Strider 2019 年 8 月 30 日
Your curves look like the step response of a control system. Your best option is likely to identify it as such with the System Identification Toolbox.
Rémi MOREAU
Rémi MOREAU 2019 年 8 月 30 日
Thanks a lot Star Strider.
I will try to test with System Identification Toolbox. .
Regards, RM

サインインしてコメントする。

採用された回答

darova
darova 2019 年 8 月 30 日
I changed your time span
% A = xlsread('data.xls','B2:E162');
% A = flipud(A); % flip up-down matrix
rec1 = A(:,1);
rec2 = A(:,2);
rec3 = A(:,3);
rec4 = A(:,4);
t = (1:length(rec1))/15 + 0.5; % time span
y = rec4;
ix = ~isnan(y); % extract only numbers
f1 = @(a,b,x) a+b./exp(x); % function to fit
F1 = fit(t(ix)',y(ix),f1)
plot(t,y,t,F1(t),'r')
legend('record 4')
Here is what this script produces
rec.png rec2.png rec3.png rec4.png
Also look in help for fit, you can boundaries of coefficients and start points
1Capture.PNG
  1 件のコメント
Rémi MOREAU
Rémi MOREAU 2019 年 8 月 30 日
THANKS A LOT :).
I will try to understand (my Matlab experience is very poor).
I will contact another time on monday if I not success in what your write.
Regards and good WE.
RM

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeBiotech and Pharmaceutical についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by