Menu

#52 for cycle not compatible with octave

open
Functions (19)
5
2008-12-02
2008-10-31
biiej
No

>
********* Welcome to JMathLib *********

> a=0
a = 0

> for i=1:10; a=a+i; endfor

> a
a = 0
ans = 0

Discussion

  • biiej

    biiej - 2008-10-31

    same works pretty well for octave

     
  • Stefan Mueller

    Stefan Mueller - 2008-11-16
    • assigned_to: nobody --> st_mueller
     
  • biiej

    biiej - 2008-12-02
    • summary: for cycle does not work --> for cycle not compatible with octave
     
  • biiej

    biiej - 2008-12-02

    works for octave (but not for jmathlib):
    a=0; for i=1:10; a=a+i; endfor
    in octave a=55 in jmathlib a=0

    also following jmathlib code causes error in octave and vice versa
    k=1;total1=0;while(k<=5){total1=total1+k;k++;};end
    k=1;total1=0;while(k<=5) total1=total1+k;k++;end
    this kind of incompatibilities is not very nice ...

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.