Hi, I am working on Some code I could find the Function for Log but not for any Antilog option.
Mostrar comentarios más antiguos
The x=log10(1000); 10^x option is not working it throws an Error.
Nor loginv.
Please if you have any options do reply. Thanks in Advance!!
1 comentario
Cam Salzberger
el 23 de Jun. de 2017
loginv is not a built-in function as far as I am aware. When I run:
x = log10(1000);
10^x
I get 1000 back out as expected. What are you getting?
If you want to provide an array of values to log10, then get them back from a power function, use 10.^x instead of 10^x.
Respuestas (3)
John D'Errico
el 23 de Jun. de 2017
0 votos
Of course there is no loginv, since raising something to a power is the inverse of the log function. Powers already exist in MATLAB so there is no need for a loginv function. (I suppose it might be nice for completeness to have that, but you can always write a loginv function yourself, if that "lack" bothers you.)
10^x is an error, BECAUSE x is not a scalar. If you need to exponentiate an array or a vector, then use 10.^x.
So the inverse of log (the natural logarithm) is the function exp.
The inverse of log10 is 10.^x.
The inverse of log2 is 2.^x.
aaru sri
el 16 de Nov. de 2018
0 votos
if i have y=exp(i*2*pi*x) and i want to find x how i cn do it
6 comentarios
Steven Lord
el 16 de Nov. de 2018
Take the log of both sides then divide.
Bruno Luong
el 16 de Nov. de 2018
If you are lucky, then steve's method might work, otherwise you'll only find x+k with k arbitrary integer, and there are a lot of them out there.
aaru sri
el 16 de Nov. de 2018
i have taken log on both sides but the value of x is not same as previous one
asdf=exp(i*2*pi*bbbb);
asdff=log(asdf); %value
asdf1=i*2*pi*bbbb; %value same as asdff
asdf3=asdff./i*2*pi; %value of bbbb is not same as asdf3
Bruno Luong
el 16 de Nov. de 2018
Editada: Bruno Luong
el 16 de Nov. de 2018
Check at least your parenthesis
aaru sri
el 16 de Nov. de 2018
i didnt get u
Bruno Luong
el 16 de Nov. de 2018
Editada: Bruno Luong
el 16 de Nov. de 2018
"parenthesis": (...)
>> 1/2*3
ans =
1.5000
>> 1/(2*3)
ans =
0.1667
>>
aaru sri
el 16 de Nov. de 2018
0 votos
thnk u so much my prob is solved
Categorías
Más información sobre MATLAB en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!