lingfei.kong 发表于 2007-8-27 15:31

Undefined command/function 的错误

function =shapeFunction(s,z)
syms s z;
N1 = (1-s)*(1-z)*(-s-z-1)/4;
N2 = (1+s)*(1-z)*(s-z-1)/4;
N3 = (1+s)*(1+z)*(s+z-1)/4;
N4 = (1-s)*(1+z)*(-s+z-1)/4;
N5 = (1-z)*(1+s)*(1-s)/2;
N6 = (1+s)*(1+z)*(1-z)/2;
N7 = (1+z)*(1+s)*(1-s)/2;
N8 = (1-s)*(1+z)*(1-z)/2;
N=;
N1s = diff(N1,s);
N2s = diff(N2,s);
N3s = diff(N3,s);
N4s = diff(N4,s);
N5s = diff(N5,s);
N6s = diff(N6,s);
N7s = diff(N7,s);
N8s = diff(N8,s);
N1z = diff(N1,z);
N2z = diff(N2,z);
N3z = diff(N3,z);
N4z = diff(N4,z);
N5z = diff(N5,z);
N6z = diff(N6,z);
N7z = diff(N7,z);
N8z = diff(N8,z);
Nmatrixss=;
Nmatrixtt=;
return


>> =shapeFunction(s,z)
??? Undefined command/function 'shapeFunction'.

[ 本帖最后由 eight 于 2007-8-27 20:08 编辑 ]

eight 发表于 2007-8-27 20:08

原帖由 lingfei.kong 于 2007-8-27 15:31 发表 http://www.chinavib.com/forum/images/common/back.gif
function =shapeFunction(s,z)
syms s z;
N1 = (1-s)*(1-z)*(-s-z-1)/4;
N2 = (1+s)*(1-z)*(s-z-1)/4;
N3 = (1+s)*(1+z)*(s+z-1)/4;
N4 = (1-s)*(1+z)*(-s+z-1)/4;
N5 = (1-z)*(1+s ...

请认真阅读各个置顶帖,你就能找到答案了

kunlei 发表于 2007-8-27 22:09

可能情况:1.shapeFunction(s,z)没有在matlab当前的工作目录下
          2.保存时没有以shapeFunction.m的文件名保存
当然还可能有n多种情况,暂时就想到这么多...
页: [1]
查看完整版本: Undefined command/function 的错误