i have two curves how to find relation between two curves in matlab. that is If I have two curve A and B. I need to find a relation such that A=XB. what is X value?

6 次查看(过去 30 天)
i have two curves how to find relation between two curves in matlab. that is If I have two curve A and B. I need to find a relation such that A=XB.

回答(1 个)

Image Analyst
Image Analyst 2021-8-18
How about this:
t = 1 : 10;
A = t .^ 2 + 20
B = 2 * A - 10;
plot(t, A, 'b-');
hold on;
plot(t, B, 'r-');
grid on;
legend('A', 'B');
X = A ./ B
% Check it:
X .* B
This isn't your homework is it?
  6 个评论
Stephen23
Stephen23 2021-8-18
编辑:Stephen23 2021-8-18
"...like what is the offset between these two curves"
In your question and previous comment you specified that you want some kind of scaling factor X.
Now you write that you want the "offset" between the two curves.
Which do you want: an offset or a scaling factor?
Note that in general neither of these will fullfile your requirement "that B curve should become A curve".
Image Analyst
Image Analyst 2021-8-18
If you just want the mean scalar to scale it you can do
factor = mean(A ./ B);
Aestimated = factor * B;
However B will not match up with A everywhere.
Are you trying to do Multivariate Curve Resolution but just don't know it? This is where you can get a set of "loadings" for building up an arbitrary curve with a set of predefined "library" curves. So using the proper weights (loadings) you can weight and sum the library curves to get you your desired curve.

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Interpolation 的更多信息

产品


版本

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by