Not odd. The 'magic' is in the fact that Valery put an evaluation (=) after the range definition of i. That changes the range to a vector. This is a special feature of Prime.
With that evaluation your sheet shows:
The summation with a single i at its bottom, requires i to be a range; vector is not allowed.
Not odd. The 'magic' is in the fact that Valery put an evaluation (=) after the range definition of i. That changes the range to a vector. This is a special feature of Prime.
With that evaluation your sheet shows:
The summation with a single i at its bottom, requires i to be a range; vector is not allowed.
Success! Luc
Ah, of course. Thanks, Luc. I definitely need those new glasses!
I did know about this "feature", but I tend to avoid putting evaluation operators at the end of definitions, precisely because of such side effects. I don't think that it's entirely clear from the rhs of the evaluation what the definition will actually assign to the variable.
IMO, for this purpose, they'd have been better off implementing a vec function that converts any argument to a vector.
I believe that I've suggested in the past that Mathcad ought to auto-iterate over vectors (or arrays, in general) in such cases. I vaguely recall having a discussion about this some time ago and there being some objections - but I can't remember what they were. I'll have to have a think about it. I vaguely recall Tom Gutman and jMG commenting ...
However, the feature request for an automatic vector product still stands. 🙂
Cheers,
Stuart
(I also wonder if min and max ought to return the first and last elements of a range ...I can think of a few uses for this capability?)