0

I have this line of pseudocode that I am trying to translate in Matlab:

(maxSum, maxStartIndex, maxEndIndex) := (-INFINITY, 0, 0)

I have translated the second and third variables simply assigning a 0:

maxStartIndex=0;
maxEndIndex=0;

How should I translate this line?

maxSum= -INFINITY

I have not find reference for this.

Robert Seifert
  • 25,078
  • 11
  • 68
  • 113
FeliceM
  • 4,163
  • 9
  • 48
  • 75

1 Answers1

0

Probably you're just looking for deal:

[maxSum, maxStartIndex, maxEndIndex] = deal(-inf,0,0)
Robert Seifert
  • 25,078
  • 11
  • 68
  • 113