全部版块 我的主页
论坛 数据科学与人工智能 数据分析与数据科学 SAS专版
10390 5
2013-11-02
如题,SAS中有函数能求一个数的立方根吗?
SAS中画函数图像有什么好方法?
比如X**2+(Y-3次根号下(x**2))**2=1..
二维码

扫码加我 拉你入群

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

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

全部回复
2013-11-2 22:06:44
data _null_;
    a = 2;
    b = 5;
    d = a**b;
    d1 = d**(1/b);
    put a= b= d= d1= ;
run;
二维码

扫码加我 拉你入群

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

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

2013-11-3 11:10:59
yongyitian 发表于 2013-11-2 22:06
data _null_;
    a = 2;
    b = 5;
thanks for your suggestion.
二维码

扫码加我 拉你入群

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

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

2013-11-4 09:42:57
SAS do not provide any function for solving a root. But you can write a simple one with a data step or iml.

Many SAS procedures can be used for solving a root. The following link is an example,

https://bbs.pinggu.org/thread-1440315-1-1.html
二维码

扫码加我 拉你入群

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

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

2013-11-4 16:56:09
bobguy 发表于 2013-11-4 09:42
SAS do not provide any function for solving a root. But you can write a simple one with a data step  ...
The optmodel in too advanced to be understood right away. I must study it for a while.
Thanks a million.  
貌似用乘方的几分之一更方便些。如x**(2/3).但是这样写好像不行,还得写成(x**2)**(1/3).
二维码

扫码加我 拉你入群

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

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

2013-11-4 17:25:30
当时是想做函数的图像,但是只能用那种近似的模拟做的,请大家指教。
即函数x**2 +(y-(x**2)**(1/3))**2=1的图像(是个心形)。
data one;
do x = -1 to 1 by .0001;
c=2/3;
y1=(x**2)**(1/3)+sqrt(1-x**2);
y2=(x**2)**(1/3)-sqrt(1-x**2);
output;
end;
run;
goptions reset=all;
symbol1 v=point interpol=m3n90  
        color=red ci=red line=30 repeat=3;
/*symbol2 v=point color=red ci=red line=2;*/
/*symbol v=dot;*/
proc gplot data=one uniform;
plot (y1 y2)*x/overlay  haxis=axis1  vaxis=axis2 ;
axis1 offset=(0,0) order=(-1 to 1 by .1 );
axis2 offset=(0,1) order=(-1 to 1.6 by .2 );

legend label=none;
run;
quit;
二维码

扫码加我 拉你入群

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

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

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

说点什么

分享

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