我是靠谱客的博主 怕孤独海燕,最近开发中收集的这篇文章主要介绍matlab未定义sqrt,MATLAB编程运行出现“未定义函数或变量 "norm" ” 请问如何...,觉得挺不错的,现在分享给大家,希望可以做个参考。

概述

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%5

function Red=mm_Red(data)%盲目约简算法,返回值为约简结果

[data_c,data_r]=size(data);

Red=data;

Red(data_c+1,data_r)=0;

[ind_data_num,ind_data_r]=size(myind(data));

[ind_Red_num,ind_Red_r]=size(myind(Red));

[Red_c,Red_r]=size(Red);

while((norm(Red(data_c+1),:)-ones(1,Red_r))~=0)

a=randint(1,1,[1,Red_r]);

if(Red(data_c+1,a)==0)

c=Red;

Red(:,a)=[];

[ind_Red_num,ind_Red_r]=size(myind(Red(1:data_c,:)));

if(ind_data_num==ind_Red_num)

[Red_c,Red_r]=size(Red);

else

Red=c;

Red(data_c+1,a)=1;

[Red_c,Red_r]=size(Red);

end

end

end

Red=Red(1:data_c,:);

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

function C=myind(a)%求划分函数

b=a;

c=intersect(a,b,'rows');

[m,n]=size(c);

[p,q]=size(a);

%C=[];

C={};

for i=1:m

z=c(i,:);

A=[];

for j=1:p

x=a(j,:);

if(ismember(z,x,'rows')==1)

A=[A j];

end

%C(i,1:length(A))=A;

C{i,1}=A;

end

end

1.JPG

(16.58 KB, 下载次数: 0)

2017-4-27 19:41 上传

442a53943febe9465fc072b4fbe10813.gif

b2a5a3e0dcc7d508e00275fe42fce1b5.gif

703594bd1acf0be38efb7e1b7ca60680.png

最后

以上就是怕孤独海燕为你收集整理的matlab未定义sqrt,MATLAB编程运行出现“未定义函数或变量 "norm" ” 请问如何...的全部内容,希望文章能够帮你解决matlab未定义sqrt,MATLAB编程运行出现“未定义函数或变量 "norm" ” 请问如何...所遇到的程序开发问题。

如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(44)

评论列表共有 0 条评论

立即
投稿
返回
顶部