フィルターのクリア

how can solve the ratio in matlab

10 ビュー (過去 30 日間)
Wajahat
Wajahat 2017 年 8 月 8 日
編集済み: John D'Errico 2017 年 8 月 9 日
how can i solve the the ratio in matlab
y(x)=1./((a^2 + b^2)e^x + (c^2 + d^2)e^-x)
where a, b,c and d are constant.
answer would be some sech()....
  4 件のコメント
dpb
dpb 2017 年 8 月 8 日
What "ratio"?
It's only sech(x) if (a^2 + b^2)=(c^2 + d^2)--> 1/2
Wajahat
Wajahat 2017 年 8 月 9 日
But in this case (a^2 + b^2) is not equal to (c^2 + d^2), and i want to write the ratio in terms of hyperbolic function in matlab.

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

採用された回答

John D'Errico
John D'Errico 2017 年 8 月 9 日
編集済み: John D'Errico 2017 年 8 月 9 日
Sigh. Has no one yet given you a useful answer yet? That is because this is simply not a question about MATLAB, in the sense that it is far easier solved using pencil and paper. Had you asked the question on a forum about mathematics, you would have gotten an answer quickly.
This is a basic transformation of variables problem. You know where you want to go. But sometimes directing a symbolic tool to give you the answer in the form you want is not trivial. Symbolic tools do as they "want", and they cannot see a fundamental form as a target.
First, make things simple.
u = a^2 + b^2
v = c^2 + d^2
Remember that u and v will always be non-negative, in case that proves to be necessary later on. Then we have:
y = 1/(u*exp(x) + v*exp(-x))
Next, pull v out of there. by defining w = u/v.
y = (1/v) * 1/(w*exp(x) + exp(-x))
So, really, this comes down to a simple problem. Even simpler when w==1, since y reduces to y=sech(x)/(2*v)
For w larger or smaller than 1, we can do another transformation. (I'm running out of variable names.)
w = exp(s)
y = (1/v) * 1/(exp(x + s) + exp(-x))
Now, we should remember that a standard sech has a point of symmetry at x==0, but we should also see that this function is just another linear transformation or so away from the target. It has a point of symmetry at x==-s/2. That should help us to recognize the next transformation.
z = x + s/2
y = (1/v)*1/(exp(s/2 + z) + exp(s/2 - z))
Factor out exp(s/2) from those exponentials.
y = 1/(v*exp(s/2)) * 1/(exp(z) + exp(-z))
Now, time to recognize some basic things. exp(s) was w. So exp(s/2) is sqrt(w).
AND don't forget that now we have finally found sech(z) in there.
y = 1/(v*sqrt(w)) * 1/2*sech(z)
y = 1/(2*v*sqrt(w)) * sech(x + s/2)
Finally, if you want, do some more un-transformations to get it all back in terms of a,b,c,d.
You need to make some effort here though. You should now be able to see yourself the rest of your way home on what may even be homework.

その他の回答 (1 件)

Akhilesh Thakur
Akhilesh Thakur 2017 年 8 月 8 日
http://www.mathworks.com/matlabcentral/newsreader/view_thread/320259 Are you asking is there any command to solve ratio? Why do you need command if you can create your own function. You just have to divide and call it.

カテゴリ

Help Center および File ExchangeMathematics and Optimization についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by