x=1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 200

问题描述:

x=1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008.
y=139578.78+136456.89*@cos(0.065646714*x-1.279387)
怎样求出这些y呀
这样的代码为什么不行呀
model:
sets:
years /1..31/:x;
endsets
data:
x=1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008;
enddata
y=139578.78+136456.89*@cos(0.065646714*x-1.279387)
end

仅仅要求出这些y吗?
那么先定义集 再求就好了 这样做
sets:
a/1..31/:x,y;
endsets
data:
x=1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008;
enddata
calc:
@for(a:y=139578.78+136456.89*@cos(0.065646714*x-1.279387));
endcalc