Effacer les filtres
Effacer les filtres

How to combine two exponential equations into one?

8 vues (au cours des 30 derniers jours)
parslee
parslee le 2 Mar 2022
Réponse apportée : KSSV le 2 Mar 2022
I have an increasing exponential function that I need to apply first half of the array and a decreasing exponentail function that needs to be apply to the last half of the array. The increasing exponential function is:
a = 0.879;
b = -0.01986;
y = a*exp(b*x);
and the decreasing exponential funciton is:
a2 = 0.06784;
b2 = 0.01986;
y2 = a2*exp(b2*x);
Is it possible to concatenate this two equations into one?
I'm multiplying these two equations to an array of 128x4224 with the following command:
dataCorrected = bsxfun(@times, dataCorrected, [y y2]);
And I would like y to be multiplied from row 1-2112 and y2 to be multipled from row 2113-4224.
  1 commentaire
Arif Hoq
Arif Hoq le 2 Mar 2022
what is the value of 'x' and 'dataCorrected'?

Connectez-vous pour commenter.

Réponses (1)

KSSV
KSSV le 2 Mar 2022
And I would like y to be multiplied from row 1-2112 and y2 to be multipled from row 2113-4224
Yes, it is possible. Let dataCorrected be your 128*4224 array and y, y2 be 1*2112 vectors.
iwant = dataCorrected.*[y y2] ; % element by element multiplication
Is it possible to concatenate this two equations into one?
IT depends on how you want. And it depends on the values of x.

Catégories

En savoir plus sur Creating and Concatenating Matrices dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by