フィルターのクリア

Find a parameter that satisfy the equation

2 ビュー (過去 30 日間)
Francesco Paolo De Simone
Francesco Paolo De Simone 2020 年 11 月 7 日
I have in a .txt file 101 samples of acceleration taken for t=[0:0.1:10].
I also have that the expression of the mathematical through which i can estimate the acceleration :
acc_samp = load('samples.txt') ;
syms y(t) b
mat_model = diff(y(t), t, t) == (20*cos(5*t)*exp(-10*t))/3 - (b*diff(y(t), t))/3 - (100*y(t))/3 ;
interval = (0:0.1:10) ; % vector containing the time instants in which the solution will be evaluated
Dy = diff(y,t) ;
dis = dsolve(mat_model, [y(0)==0, Dy(0)==0]) ; % symbolic expression of the displacement y(t,b)
acc = diff(dis,t,2) ; % symbolic expression of the acceleration yddot(t,b)
How it is possible to find a b such that acc_samp and acc are equal for t=[0:0.1:10]?
Thank you

回答 (1 件)

Raunak Gupta
Raunak Gupta 2020 年 11 月 13 日
Hi,
It is my assumption since the variable b is not declared numerically the acc variable will be in terms of b only. If that is the case, then you may want to equate the two vectors to find the out the value of b. But note that there are 101 samples in acc_samp so it will create 101 equations when equating the variables acc and acc_samp. This can give multiple solutions for b. So, a better approach will be to minimize the difference between two vectors given a single value of b. This answer can help set up the optimization problem.
  1 件のコメント
Francesco Paolo De Simone
Francesco Paolo De Simone 2020 年 11 月 15 日
Thanks a lot for the answer! It works nicely!

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

カテゴリ

Help Center および File ExchangeSymbolic Math Toolbox についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by