Mathematica Asked by Anon77 on December 14, 2020
I have a list that contains a set of coordinates in the form {{x1,y1}, {x2,y2}, …}. I want to edit the list in manner that it takes the log() of all the y coordinates only. Essentially, I want redefine the list such that it now contains {{x1,log(y1)}, {x2,log(y2)}, …}.
{{x1, y1}, {x2, y2}, {x3, y3}} /. {x_, y_} :> {x, Log[y]}
Or
{#1, Log[#2]} & @@@ {{x1, y1}, {x2, y2}, {x3, y3}}
Or the method which provided by @wuyudi
Answered by cvgmt on December 14, 2020
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP