MATLAB中如何判断一个矩阵中的元素是不是等于某一值S='Scientists look for universal patterns of complex systems because such invariant features may help to unveil the principles of system organization.Complex network studies can not
来源:学生作业帮助网 编辑:六六作业网 时间:2024/11/17 23:29:31
MATLAB中如何判断一个矩阵中的元素是不是等于某一值S='Scientists look for universal patterns of complex systems because such invariant features may help to unveil the principles of system organization.Complex network studies can not
MATLAB中如何判断一个矩阵中的元素是不是等于某一值
S='Scientists look for universal patterns of complex systems because such invariant features may help to unveil the principles of system organization.Complex network studies can not only provide a unique viewpoint of nature and society but also reveal ubiquitous patterns,e.g.,small world and scale free,characteristic of various complex systems.However,ecological studies have shown that binary food webs,which depict trophic interactions in ecosystems,refuse to become part of the small world and scale free networks family.'; %这样一个字符串
i=1:26;
output=char(i+96)
A=find(double(S)==i+96); %找到其中为A的元素
S(A) %输出
额.系统报错 说
Error using ==
Matrix dimensions must agree.
Error in mart (line 4)
A=find(double(S)==i+96);
嗯 求教哪里不对啊
MATLAB中如何判断一个矩阵中的元素是不是等于某一值S='Scientists look for universal patterns of complex systems because such invariant features may help to unveil the principles of system organization.Complex network studies can not
>> size(double(S))
ans =
1 531
>> size(i+96)
ans =
1 26
两个阵的维数不相等,不能用==来比较
你能再说的详细点不?程序要达到什么目的