필터 지우기
필터 지우기

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