フィルターのクリア

How to combine two exponential equations into one?

8 ビュー (過去 30 日間)
parslee
parslee 2022 年 3 月 2 日
回答済み: KSSV 2022 年 3 月 2 日
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 件のコメント
Arif Hoq
Arif Hoq 2022 年 3 月 2 日
what is the value of 'x' and 'dataCorrected'?

サインインしてコメントする。

回答 (1 件)

KSSV
KSSV 2022 年 3 月 2 日
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.

カテゴリ

Help Center および File ExchangeCreating and Concatenating Matrices についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by