Borrar filtros
Borrar filtros

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 visualizaciones (últimos 30 días)
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.

Respuestas (1)

Image Analyst
Image Analyst el 18 de Ag. de 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
This isn't your homework is it?
  6 comentarios
Stephen23
Stephen23 el 18 de Ag. de 2021
Editada: Stephen23 el 18 de Ag. de 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
Image Analyst el 18 de Ag. de 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.

Iniciar sesión para comentar.

Categorías

Más información sobre Interpolation en Help Center y File Exchange.

Productos


Versión

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by