フィルターのクリア

help with minimisation, from a data set

1 回表示 (過去 30 日間)
CLARK KENDRICK GO
CLARK KENDRICK GO 2018 年 7 月 6 日
編集済み: Matt J 2018 年 7 月 9 日
I have a data set of the positions (in x,y coordinates) of n particles per time step. I will call this matrix P which has dimensions n by 2 by t.
I also have a linear combination of 8 forces (each in two dimensions) of n particles per time step. So the forces F would have dimensions n by 16 by t. (It is 16 because there are 8 forces and two dimensions each.) We can get data from here.
Since this is a linear combination, I have a set of 8 constants, C, one for each force.
My question is, so we have the equation P = FC, and I want to find C so that P-FC is minimised. I do not know how to perform this given all these matrix dimensions.

採用された回答

Alan Weiss
Alan Weiss 2018 年 7 月 6 日
If you are using matrix multiplication (and it seems to me that you are), you have the equation
F*C = P
and you are trying to solve for C, in the least-squares sense. The MATLAB command for this is
C = F\P
Alan Weiss
MATLAB mathematical toolbox documentation
  2 件のコメント
CLARK KENDRICK GO
CLARK KENDRICK GO 2018 年 7 月 9 日
I didn't know! That is a lot easier than I anticipated!
Matt J
Matt J 2018 年 7 月 9 日
編集済み: Matt J 2018 年 7 月 9 日
Clark,
Since it addressed your question, you should Accept-click Alan's answer. You should do likewise in all of your open threads.

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeSolver Outputs and Iterative Display についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by