Search found 3 matches

by pzezza
6 years ago
Forum: Syntax
Topic: EQUALLY SPACED DATES
Replies: 0
Views: 2174

EQUALLY SPACED DATES

Hello, I have the following problem: I have a given final date, let's say March 17th, 2025 and I want to construct a list of equally spaced preceding dates. The space could be 2,3,4,6 months so that the dates repeat annually. (For a 6 months interval) I would have 3/17/2025, 9/17/2024, 3/17/2024, 9/...
by pzezza
6 years ago
Forum: Syntax
Topic: Sum Counterdiagonal elements
Replies: 2
Views: 2849

Re: Sum Counterdiagonal elements

Thanks, very helpful. I realised that searching for reverse order I could have found some hints and I came upwith

SUM(i, x(i,i+(10-2*ord(i))))
:)
thanks again
by pzezza
6 years ago
Forum: Syntax
Topic: Sum Counterdiagonal elements
Replies: 2
Views: 2849

Sum Counterdiagonal elements

Hello I need to sum the elements of the two main diagonal elements of a 9x9 matrix. The first one is easy Sum(i,x(i,i)) but for the second I tried sum(i,x(i,9-i)) or analogous variations but I didn't succeed.
Thanks for your help
Pierluigi