当前位置:编程学习 > Matlab >>

Matlab程序问题

function yuce1() shuju=xlsread('MatlabPA.xls'); a=shuju(1:28,1:96); e1=[]; for i=1:96 a1=a(:,i); b1=sum(a1); c1=21; d1=b1/c1; if i==1 j=96; else j=i-1; end h1=a(22,:); if i-1==0 e1(i)=(d1+a(21,j))/2; else e1(i)=(d1+h1(i))/2; end end e1 f1=1:96; plot(f1,e1) hold on plot(f1,a(22,:),'r') 源码,运行时出现 function yuce1() | Error: Function definitions are not permitted in this context. 求解?
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,