Scaling one dataset to fit another dataset

5 ビュー (過去 30 日間)
KingsOz
KingsOz 2022 年 8 月 3 日
コメント済み: Walter Roberson 2022 年 8 月 3 日
I am trying to fit one dataset with another dataset. Dataset 1 is defined by (x,y) where x and y are colum vectors. Dataset 2 is defined by (v,t) where v and t are also column vectors. The challenge here is that the scaling factor needs to be of the form: M^z1 * N^z3 * P^z4 * U^z5 when v < 0.065
for v >0.065, the scaling factor needs to be M^z2 * N^z3 * P^z4 * U^z5
where M, N, P and U are constant based on the system properties and can be readliy calculated. However, I do not know how to use matlab to calculate the values of z1, z2, z3, z4 and z5 for the best fit possible. I tried using fminsearch without any success. Can matlab handle this problem?
Thanks,
Kings
  2 件のコメント
Matt J
Matt J 2022 年 8 月 3 日
編集済み: Matt J 2022 年 8 月 3 日
The problem is over-parametrized. There are infinite choice of the z1...z5 that produce a given set of scaling factors.
KingsOz
KingsOz 2022 年 8 月 3 日
@Matt J What if I fix the values of z3, z4, and z5 so that I only have to solve for z1 and z2. Is this possible with matlab? Thanks

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

採用された回答

Walter Roberson
Walter Roberson 2022 年 8 月 3 日
It is not clear what is being scaled, or how x y v t fit in here other than the condition for v.
But suppose you break the data up into the two cases. Now for each case take log() of the scaling factor. log(M)*z1 + log(N)*z3 and so on. Decrease z1 by 1 and you can exactly compensate by raising z3 to balance the equation. Therefore the system has no definite solution.
  2 件のコメント
KingsOz
KingsOz 2022 年 8 月 3 日
@Walter Roberson I am trying to scale t to match y, both are column vectors of the same size (60x1) in the datasets. x and v are column vectors of size (60x1) representing time and are essentially equal (for example 0, 0.005, 0.01, 0.015 etc.). Thus, the difference is the amplitude of the plot t and y.
Walter Roberson
Walter Roberson 2022 年 8 月 3 日
so
y ~= t * M^z1 * N^z3 * P^z4 * U^z5
for the first case.
Take the log of both sides. If you fixed all of z except 1 then move those values to the left. Divide each left by its corresponding t and by M. Take the mean to arrive at z1

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

その他の回答 (0 件)

製品


リリース

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by