I have several functions:

IDCT1=Function[{i,j},1/4*Sum[Sum[Cc[i,u]*Cc[j,v]*Q[u,v]*Y1[u,v], {v,0, 7}],{u, 0, 7}]]
IDCT2=Function[{i,j},1/4*Sum[Sum[Cc[i,u]*Cc[j,v]*Q[u,v]*Y2[u,v], {v,0, 7}],{u, 0, 7}]]

where Q is a matrix

FullSimplify accepts expressions, not functions.

How do I simplify ICDT1[i,j]*ICDT2[i,j] without rewriting everything as expressions?

  • $\begingroup$ FullSimplify[ICDT1[i, j] * ICDT2[i, j]] will already (try to) simplify the resulting expression. Would that not work? $\endgroup$
    – MarcoB
    Mar 12, 2019 at 12:38

1 Answer 1

IDCT = Function[{i, j}, Evaluate@FullSimplify[IDCT1[i, j]*IDCT2[i, j]]]

(takes a while to evaluate)

  • $\begingroup$ Cannot check because it times out.... $\endgroup$
    – Antonio
    Mar 12, 2019 at 20:20
  • $\begingroup$ Try replacing FullSimplify with Simplify, Factor, or whatever you need. My point was only to show you how to stay with functions instead of expressions, not how to simplify your specific terms. $\endgroup$
    – Roman
    Mar 13, 2019 at 2:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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