0
$\begingroup$

I performed quite a search, and I am unable to find a quick solution to the following problem.

I have a $p \times q$ matrix $c$, say

c = {{1 , 3}, {3, 4}}

and function $f$, $\mathbb{R}^q \to \mathbb{R}$ say

f (x_, y_) := x + y

how to elegantly evaluate the function on the matrix's rows, $f[c_{11},c_{12}]$, $f[c_{21},c_{22}]$ and so on?

Thanks a lot

$\endgroup$
3
  • $\begingroup$ f @@@ c assuming you define f correctly. f[x_, y_]:=x+y that is. $\endgroup$ – Kuba Feb 2 '19 at 14:09
  • 1
    $\begingroup$ Let me know if my comment or the linked answer are not solving your problem. $\endgroup$ – Kuba Feb 2 '19 at 14:11
  • $\begingroup$ @Kuba, it does thanks a lot, I even tried but ade various syntax mistakes, any thanks again $\endgroup$ – Smerdjakov Feb 2 '19 at 14:29

Browse other questions tagged or ask your own question.