hi everyone

I want to translate some matlab code into sage
but i get some problem
here are the matlab code

if omega<=-yo
        uno=1;
    elseif omega>=-yo & omega<=0
        uno=omega/-yo;
    else uno=0;
    end

i read the "Loops, Functions, Control Statements, and Comparisons" in
Tutorial
and try to use the "if" in sage
here is the example

for i in range(15):
       if gcd(i,15) == 1:
           print(i)

and try

a=5
b=3
d=100
for c=a+b:
       if c == 2:
       print d

here i try to print 100 if c is equal to 2
but the Syntax Error

Q:
    1.If i have this kind of question what can i read first?
    2.What Syntax Error is on my code?
    3.Where can i find the basic usage of the code i want to use in
the upon matlab code?

Sorry for my terrible English and thx for help





--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to