# Tag Info

14

Introduction This post is long overdue as I have been repeatedly asked to explain code of mine containing these things. As I see increased use of this construct by others perhaps it is past due also. SparseArray objects can behave as functions accepting certain arguments to return internal data or efficiently return data in certain forms. These are known ...

1

Not sure how large of m and n you deem "large", but certainly it should be obvious that creating a Table for the purposes of populating a SparseArray is, to be charitable, counterproductive (I'd use something much more colorful were an engineer working for me to do such things). Take advantage of the sparse-aware Mathematica functions: ...

1

Condition (/;) has attribute HoldAll, so j == i + k n is not evaluated and the value of k never gets there. Rule is not held, so t in {k -> t} is evaluated before replacing k in the Condition. But it turns out you don't actually need the Table here, you can do something like: SparseArray[{i_, j_} /; (i == Mod[j, n, 1] && j <= m n) -> ...

2

What follows is my latest edit. I have moved my previous attempts to solve this to the bottom of the answer. EDIT 04.05.15 I have given this problem some more thought. It's peculiar, that Mathematica cannot solve it straight away, but it should in fact be quite easy. Using your notation, we are dealing with the following differential equation:  ...

Top 50 recent answers are included