mathematica 递阶结构模型的建立

为了保证程序不出错 这里贴的是代码格式而非纯文本 请粘贴到mathematica中后阅读

m = ( {
     {1, \[Placeholder], \[Placeholder], \[Placeholder], \
\[Placeholder], \[Placeholder], \[Placeholder]},
     {1, 1, \[Placeholder], \[Placeholder], \[Placeholder], \
\[Placeholder], \[Placeholder]},
     {\[Placeholder], \[Placeholder], 1, 1, 1, 1, \[Placeholder]},
     {\[Placeholder], \[Placeholder], \[Placeholder], 1, 1, 
      1, \[Placeholder]},
     {\[Placeholder], \[Placeholder], \[Placeholder], \[Placeholder], 
      1, \[Placeholder], \[Placeholder]},
     {\[Placeholder], \[Placeholder], \[Placeholder], 1, 1, 
      1, \[Placeholder]},
     {1, 1, \[Placeholder], \[Placeholder], \[Placeholder], \
\[Placeholder], 1}
    } ) /. \[Placeholder] -> 0;
r = Flatten[Position[#, 1] & /@ m, {3, 1}](*可达集*)
a = Flatten[Position[#, 1] & /@ [email protected], {3, 1}](*先行集*)
c = MapThread[Intersection, {r, a}](*共同集*)
b = [email protected][MapThread[Equal, {c, a}], True]

r=DeleteCases[r,[email protected]@b,2](*删去已分层要素*)
a=DeleteCases[a,[email protected]@b,2]
[email protected][MapThread[Equal,{c,a}],True]

 

 

相关文章:

  • 2021-10-17
  • 2021-06-26
  • 2021-07-25
  • 2022-12-23
  • 2022-12-23
  • 2021-12-10
  • 2021-10-09
  • 2022-12-23
猜你喜欢
  • 2021-10-07
  • 2022-02-19
  • 2021-08-27
  • 2021-05-19
  • 2021-11-29
  • 2021-12-05
  • 2021-12-05
相关资源
相似解决方案