1
$\begingroup$

I would like to create a multidimensional table without certain indices. For example, I would like to write

T:=Table[x, {i,1,10}, {j,1,10}]

with i!=j.

Is there any command that I can add into Table to impose i different from j?

Thanks!

$\endgroup$

closed as off-topic by Anton Antonov, J. M. is away Apr 4 '17 at 14:39

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." – Anton Antonov, J. M. is away
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 1
    $\begingroup$ "any command ... to impose i different from j?" - If[]? $\endgroup$ – J. M. is away Apr 4 '17 at 12:54
  • 1
    $\begingroup$ It's not immediately clear to me what you're asking, but I would suspect something like Table[If[i!=j, x, Nothing], {i,1,10}, {j,1,10}] may do the trick. $\endgroup$ – user6014 Apr 4 '17 at 12:55
  • 1
    $\begingroup$ Of course!! Thank you!!! $\endgroup$ – Dan Cat Apr 4 '17 at 13:16

Browse other questions tagged or ask your own question.