i write the code of the recursion equation,but it can not work correctly.
who can help me.
RSolve[{
a[0]==(1-p)a[n],
For[i=1,i<=n-1,i++,a[i]==p a[n-i+1]+(1-p)a[n-i]],
a[n]==a[0]+p a[1],
Sum[a[k],{k,0,n}]==1},
a[n],n]
@Artes I don't think there's anything interesting either. On most other sites, you'll also find silly and undesirablebehaviour from users just trying to game the hats. I would much rather this not be a feature of our site in the future as well, which is why I downvoted this question. — rm -rf10 hours ago
@SjoerdC.deVries thanks, but if instead of f[t+1.0], I have {{1., 0.}, {0., 1.}} + f[t + 1.], how can I evaluate f[t+1.0] and hold the matrix addition?
For example, If I use {{1., 0.}, {0., 1.}} + f[t + 1.] // Evaluate, then I get the code repeat for times:
{{1. + If[1. + t < 1., a (1. + t), -a (1. + t)], 0. + If[1. + t < 1., a (1. + t), -a (1. + t)]}, {0. + If[1. + t < 1., a (1. + t), -a (1. + t)], 1. + If[1. + t < 1., a (1. + t), -a (1. + t)]}}
@SjoerdC.deVries and when compile like this, the corresponding compiled code for f[t] would repeat for multiple times.
Well, you said it repeated 4 times in the matrix addition itself. It doesn't. The two repeats you see are simply the two branches of your If statement.
@szabolcs Regarding "WolframLink"; have you heard anything about the timing of this change? ML* works on the RPi and I wonder if Wolfram is going to eliminate or deprecate the ML* functions, or perhaps make ML* == WL* for the meanwhile...
@bobthechemist All I know is the documentation page I linked to. I assume they will keep around the ML versions of aliases, anything else would be ridiculously counterproductive.
@bobthechemist I mean I don't have any more information than you (or anyone else) do. The only way I found out about this is that I looked at the online docs.