经管之家App
让优质教育人人可得
立即打开
全部版块
我的主页
›
论坛
›
数据科学与人工智能
›
数据分析与数据科学
›
SAS专版
Remove a row and corresponding column in a square matrix SAS/IML
楼主
bobguy
1529
2
收藏
2012-11-05
You may code it as a function call.
proc iml;
a=shape(1:25,5,5);
n=nrow(a);
***remove R3C3****;
%let k=3;
idx1=cusum( &k || j(1,n-1,5) );
idx2=((&k-1)*n+1):&k*n;
b=shape(remove(a,idx1||idx2),n-1,n-1);
print idx1 idx2 ;
print a ;
print b ;
quit;
扫码加我 拉你入群
请注明:姓名-公司-职位
以便审核进群资格,未注明则拒绝
全部回复
沙发
w661144
2012-11-5 10:19:48
?///??
扫码加我 拉你入群
请注明:姓名-公司-职位
以便审核进群资格,未注明则拒绝
藤椅
priss111
2012-11-5 11:14:38
谢谢分享
function与连接符||之间很巧妙的应用.
idx1 || idx2正好与remove function 中的indices对应
REMOVE( matrix, indices)
The inputs to the REMOVE function are as follows:
matrix
is a numeric or character matrix or literal.
indices
refers to a matrix containing the indices of elements that are removed from matrix.
扫码加我 拉你入群
请注明:姓名-公司-职位
以便审核进群资格,未注明则拒绝
相关推荐
Correspond this esc
R matrix 的 column 计算
Correspondence: A note on the orders of the infinite zeros
打开do 文件 not responding
SAS 9.3 "The Java proxy is not responding" 解决方法
求翻译这句话的意思啊 ,谢谢啦
SAS 9.4 The Java proxy is not responding. 解决方法
Responding to crises
Parent proxy is not responding
How do firms respond to minimum wage regulation in China
栏目导航
SAS专版
教师之家与经管教育
爱问频道
金融学(理论版)
python论坛
经管文库(原现金交易版)
热门文章
Nature点赞!哈佛MIT最新作:AI科学家时代来 ...
CDA 认证考试大纲 2025 重磅更新:一二级考 ...
达富发投资关于中百集团行情数据操作分析与 ...
英文书籍
超越普里瓦洛夫无穷乘积与它对解析函数的应 ...
超越普里瓦洛夫数项级数卷
GTAP11运行扩展数据库出错,希望高手指点。
2025秋季大摩宏观团队闭门会议纪要
美国国家科学基金数据
建筑的想象之整理补充笔记
推荐文章
10月重磅来袭|《打造Coze/Dify专属学术智能 ...
高校老师和学生都在偷偷上的智能体课,到底 ...
最快1年拿证,学费不足5W!热门美国人工智能 ...
关于如何利用文献的若干建议
关于学术研究和论文发表的一些建议
关于科研中如何学习基础知识的一些建议 (一 ...
一个自编的经济学建模小案例 --写给授课本科 ...
AI智能体赋能教学改革: 全国AI教育教学应用 ...
2025中国AIoT产业全景图谱报告-406页
关于文献求助的一些建议
说点什么
分享
微信
QQ空间
QQ
微博
扫码加好友,拉您进群
各岗位、行业、专业交流群