声振论坛

 找回密码
 我要加入

QQ登录

只需一步,快速开始

查看: 3014|回复: 2

[编程技巧] Undefined command/function 的错误

[复制链接]
发表于 2007-8-27 15:31 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?我要加入

x
function [Nmatrixss,Nmatrixtt]=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=[N1 N2 N3 N4 N5 N6 N7 N8];
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=[N1s,N2s,N3s,N4s,N5s,N6s,N7s,N8s];
Nmatrixtt=[N1z,N2z,N3z,N4z,N5z,N6z,N7z,N8z];
return


>> [Nmatrixss,Nmatrixtt]=shapeFunction(s,z)
??? Undefined command/function 'shapeFunction'.

[ 本帖最后由 eight 于 2007-8-27 20:08 编辑 ]
回复
分享到:

使用道具 举报

发表于 2007-8-27 20:08 | 显示全部楼层
原帖由 lingfei.kong 于 2007-8-27 15:31 发表
function [Nmatrixss,Nmatrixtt]=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 ...


请认真阅读各个置顶帖,你就能找到答案了
发表于 2007-8-27 22:09 | 显示全部楼层
可能情况:1.shapeFunction(s,z)没有在matlab当前的工作目录下
          2.保存时没有以shapeFunction.m的文件名保存
当然还可能有n多种情况,暂时就想到这么多...
您需要登录后才可以回帖 登录 | 我要加入

本版积分规则

QQ|小黑屋|Archiver|手机版|联系我们|声振论坛

GMT+8, 2024-11-18 18:51 , Processed in 0.053850 second(s), 17 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表