0
$\begingroup$

I'm using Wolfram | Alpha Pro; I have a function

f[n] = 351n^(-0.7);

How do I apply it to each element of a list like {2, 9, 22}?

f/@{2, 9, 22} just results in showing {f(2), f(9), f(22)} without calculating the values. Thanks.

$\endgroup$

closed as off-topic by MarcoB, m_goldberg, user9660, Yves Klett, Edmund Feb 2 '16 at 9:33

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This question arises due to a simple mistake such as a trivial syntax error, incorrect capitalization, spelling mistake, or other typographical error and is unlikely to help any future visitors, or else it is easily found in the documentation." – MarcoB, m_goldberg, Community, Edmund
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 3
    $\begingroup$ I have no idea what is possible in W|A Pro, but when it takes real Mathematica syntax, then you should try to define your function as f[n_]:=351n^(-7/10) $\endgroup$ – halirutan Feb 2 '16 at 1:00
2
$\begingroup$
f[n_] = 351 n^(-0.7);

f /@ {2, 9, 22}

(*  {216.066, 75.3941, 40.3284}  *)

Or, using a pure function

351 #^(-0.7) & /@ {2, 9, 22}

(*  {216.066, 75.3941, 40.3284}  *)

In WolframAlpha use the pure function

WolframAlpha["351 #^(-0.7)&/@{2,9,22}"]

enter image description here

$\endgroup$
  • $\begingroup$ Bob, this works, thank you so much. $\endgroup$ – Strychnine Feb 2 '16 at 3:20

Not the answer you're looking for? Browse other questions tagged or ask your own question.