Antilog formula in matlab

66 次查看(过去 30 天)
nichapat asayakhun
评论: Stephen23 2023-9-19
How can I put this function of inverselog in matlab code. Where A and B is the constant.

回答(2 个)

Chunru
Chunru 2021-8-4
tmp = 1og10((W_TO-A)./B);
W_E = 10.^(tmp); % check out the definition of invlog10; it should be 10^x

David Gordon
David Gordon 2023-9-18
wHY IS HELP IN MATLAB SO CRAPPY??????
TO understand your answers I need to understand matlab which is why i'm using matlab help!!! uselesssssssss!!!!!!!
How can I take 10^(1x1651 double vaiable) ?????????
  2 个评论
John D'Errico
John D'Errico 2023-9-18
编辑:John D'Errico 2023-9-18
Yours is not an answer to the question. It is just a rant, due to your not understanding how to use the language. It just means you needed to read the manual, or perhaps better yet, to do one of the many tutorials you could find.
However, if you want to form an element-wise power operation, you need to use the element-wise operator, thus .^ operator. For example...
P = 1:.5:3
P = 1×5
1.0000 1.5000 2.0000 2.5000 3.0000
format short g
10.^P
ans = 1×5
1.0e+00 * 10 31.623 100 316.23 1000
So we see 10 raised successively to each of those powers.
The power operator that does not have a dot in it is used for linear algebra operatios, essentially when the arguments are not scalars. If both arguments are scalars, then the two operators are the same. Since MATLAB is a language designed to be used for linear algebra by the rest of us, it makes sense there need to be two sets of operators.
Stephen23
Stephen23 2023-9-19
"wHY IS HELP IN MATLAB SO CRAPPY??????"
You are using MPOWER operator (which is the wrong operation). When you scroll to the bottom of the MPOWER documentation it contains links to other related functions including POWER (which is the correct operation). Note that both of those pages also link to this important page:
which explains fundamental information that is important to understand about such numeric operations.
When you get stuck using MATLAB start by reading the documentation of the operator that you are already using (e.g. MPOWER) and also take the time to read anything that the its documentation links to. If you do not do that then it will be very hard to learn to use MATLAB.

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Logical 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by