Group Abstract Group Abstract

Message Boards Message Boards

0
|
3.4K Views
|
1 Reply
|
1 Total Like
View groups...
Share
Share this post:

Import a list of data and apply a function to one of the coordinates?

Posted 7 years ago

One way to do it is with replacement rules:

f[x_] := a x^2;
{{x1, y1}, {x2, y2}, {x3, y3}} /. {x_, y_} :> {f[x], y}

Then you can plot the result with ListPlot.

POSTED BY: Gianluca Gorni
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard