Skip to main content
deleted 5 characters in body
Source Link
ubpdqn
  • 64.9k
  • 3
  • 65
  • 154

Update

You could just make the equal indices vanish:

Sum[Sign[Abs[i - j]] c[i] \[Phi][i, j] \[Beta][j], {i, 1, 4}, {j, 1, 
  4}]

or better as @Guesswhoitis. using Iverson notation concept:

Sum[Sign[Boole[iSum[Boole[i!=j] c[i] \[Phi][i, j] \[Beta][j], {i, 1, 4}, {j, 1, 
  4}]

or somewhat ridiculous:

mat[sym_, m_, n_] := 
 Normal@SparseArray[{i_, j_} :> sym[i, j] /; i != j, {m, n}]
cm = Array[c, 4]
be = Array[\[Beta], 4]
cm.mat[\[Phi], 4, 4].be

where you must match up row and column lengths.

Update

You could just make the equal indices vanish:

Sum[Sign[Abs[i - j]] c[i] \[Phi][i, j] \[Beta][j], {i, 1, 4}, {j, 1, 
  4}]

or better as @Guesswhoitis. using Iverson notation concept:

Sum[Sign[Boole[i!=j] c[i] \[Phi][i, j] \[Beta][j], {i, 1, 4}, {j, 1, 
  4}]

or somewhat ridiculous:

mat[sym_, m_, n_] := 
 Normal@SparseArray[{i_, j_} :> sym[i, j] /; i != j, {m, n}]
cm = Array[c, 4]
be = Array[\[Beta], 4]
cm.mat[\[Phi], 4, 4].be

where you must match up row and column lengths.

Update

You could just make the equal indices vanish:

Sum[Sign[Abs[i - j]] c[i] \[Phi][i, j] \[Beta][j], {i, 1, 4}, {j, 1, 
  4}]

or better as @Guesswhoitis. using Iverson notation concept:

Sum[Boole[i!=j] c[i] \[Phi][i, j] \[Beta][j], {i, 1, 4}, {j, 1, 
  4}]

or somewhat ridiculous:

mat[sym_, m_, n_] := 
 Normal@SparseArray[{i_, j_} :> sym[i, j] /; i != j, {m, n}]
cm = Array[c, 4]
be = Array[\[Beta], 4]
cm.mat[\[Phi], 4, 4].be

where you must match up row and column lengths.

added 165 characters in body
Source Link
ubpdqn
  • 64.9k
  • 3
  • 65
  • 154

Update

You could just make the equal indices vanish:

Sum[Sign[Abs[i - j]] c[i] \[Phi][i, j] \[Beta][j], {i, 1, 4}, {j, 1, 
  4}]

or better as @Guesswhoitis. using Iverson notation concept:

Sum[Sign[Boole[i!=j] c[i] \[Phi][i, j] \[Beta][j], {i, 1, 4}, {j, 1, 
  4}]

or somewhat ridiculous:

mat[sym_, m_, n_] := 
 Normal@SparseArray[{i_, j_} :> sym[i, j] /; i != j, {m, n}]
cm = Array[c, 4]
be = Array[\[Beta], 4]
cm.mat[\[Phi], 4, 4].be

where you must match up row and column lengths.

You could just make the equal indices vanish:

Sum[Sign[Abs[i - j]] c[i] \[Phi][i, j] \[Beta][j], {i, 1, 4}, {j, 1, 
  4}]

or somewhat ridiculous:

mat[sym_, m_, n_] := 
 Normal@SparseArray[{i_, j_} :> sym[i, j] /; i != j, {m, n}]
cm = Array[c, 4]
be = Array[\[Beta], 4]
cm.mat[\[Phi], 4, 4].be

where you must match up row and column lengths.

Update

You could just make the equal indices vanish:

Sum[Sign[Abs[i - j]] c[i] \[Phi][i, j] \[Beta][j], {i, 1, 4}, {j, 1, 
  4}]

or better as @Guesswhoitis. using Iverson notation concept:

Sum[Sign[Boole[i!=j] c[i] \[Phi][i, j] \[Beta][j], {i, 1, 4}, {j, 1, 
  4}]

or somewhat ridiculous:

mat[sym_, m_, n_] := 
 Normal@SparseArray[{i_, j_} :> sym[i, j] /; i != j, {m, n}]
cm = Array[c, 4]
be = Array[\[Beta], 4]
cm.mat[\[Phi], 4, 4].be

where you must match up row and column lengths.

Source Link
ubpdqn
  • 64.9k
  • 3
  • 65
  • 154

You could just make the equal indices vanish:

Sum[Sign[Abs[i - j]] c[i] \[Phi][i, j] \[Beta][j], {i, 1, 4}, {j, 1, 
  4}]

or somewhat ridiculous:

mat[sym_, m_, n_] := 
 Normal@SparseArray[{i_, j_} :> sym[i, j] /; i != j, {m, n}]
cm = Array[c, 4]
be = Array[\[Beta], 4]
cm.mat[\[Phi], 4, 4].be

where you must match up row and column lengths.