经管之家App
让优质教育人人可得
立即打开
全部版块
我的主页
›
论坛
›
数据科学与人工智能
›
数据分析与数据科学
›
SAS专版
Remove a row and corresponding column in a square matrix SAS/IML
楼主
bobguy
1567
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专版
经管文库(原现金交易版)
经管高考
EViews专版
stata专版
行业分析报告
热门文章
表格结构数据特征与CDA数据分析师:精准适配 ...
CDA 认证考试大纲 2025 重磅更新:一二级考 ...
【中国电信】2025年云计算研究白皮书
数论I : Fermat的梦想和类域论
普华永道 - 中国影响力报告2025
房地产行业:2026年,年轻人应该先买车还是 ...
2025年中国老年护理行业市场研究报告
【应用统计学资料】98份应用统计学资料合集
表格结构数据的核心特征及具象实例解析
湖南统计年鉴2025(Excel版)
推荐文章
2026JG学术冬训营:从Stata初高到Python机器 ...
【必看】【本版版规,欢迎发悬赏贴求助】
26年寒假天津站|Gemini论文写作&数据分析 ...
关于如何利用文献的若干建议
关于学术研究和论文发表的一些建议
关于科研中如何学习基础知识的一些建议 (一 ...
一个自编的经济学建模小案例 --写给授课本科 ...
AI智能体赋能教学改革: 全国AI教育教学应用 ...
2025中国AIoT产业全景图谱报告-406页
关于文献求助的一些建议
说点什么
分享
微信
QQ空间
QQ
微博
扫码加好友,拉您进群
各岗位、行业、专业交流群