全部版块 我的主页
论坛 数据科学与人工智能 数据分析与数据科学 SAS专版
2096 2
2010-12-15
在使用SAS/iml的过程中想要读取一个数据,但是发现程序报错,然后想了一下可能是SAS/iml不能进行这样的操作。现将我的程序写出来希望得到高人的指点!
proc iml;
a={-1/SQRT(2) 1/SQRT(2) 0 0, -1/SQRT(6) -1/SQRT(6) 2/SQRT(6) 0,-1/SQRT(12) -1/SQRT(12) -1/SQRT(12) 3/SQRT(12)};
print a1;quit;
这里面矩阵a中的元素不能是函数的运算是吧?如果我仍然想进行这样的操作的话有什么方法可以解决呢?
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

全部回复
2010-12-15 22:24:56
1# jlwjlwjlw
不知道这样行不行?
proc iml;
a={-1 1 0 0,
    -1 -1 2 0,
    -1 -1 -1 3};
b=a[1,]/sqrt(2)//a[2,]/sqrt(6)//a[3,]/sqrt(12);
print b;
quit;

The values you input can be any of the following:
  • a number, with or without decimal points, possibly in scientific notation (such as 1E-5)
  • a character string. Character strings can be enclosed in either single quotes (') or double quotes ("), but they do not need to have quotes. Quotes are required when there are no enclosing braces or when you want to preserve case, special characters, or blanks in the string. If the string has embedded quotes, you must double them (for example, WORD='Can''t'). Special characters can be any of the following: ?   =   *   :   (   ).
  • a period (.), representing a missing numeric value
  • numbers in brackets ([ ]), representing repetition factors
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2010-12-16 13:20:36
这个结果太好了!一直以来,SAS的基本函数还没搞清楚,看到这个结果后发现很多基础的命令还是要掌握好!谢谢啦!
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

扫码加好友,拉您进群
各岗位、行业、专业交流群