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?
9 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
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.
Antworten (1)
Image Analyst
am 18 Aug. 2021
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
6 Kommentare
Stephen23
am 18 Aug. 2021
Bearbeitet: Stephen23
am 18 Aug. 2021
"...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
am 18 Aug. 2021
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.
Siehe auch
Kategorien
Mehr zu Interpolation finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!