24小时热门版块排行榜    

查看: 394  |  回复: 3

柱子234

新虫 (小有名气)

[求助] 求高手解答。。。matlab不能运行。。如下 已有1人参与

syms x L L1;
y = sym('x - L/2');
u = sym('(-tanh(x-L/2-L1) + tanh(x-L/2+L1))*cos(x-L/2)');
u1 = diff(u,'x');
u2 = diff(u1, 'x');
u3 = diff(u2, 'x');
u4 = diff(u3, 'x');
exp = -u4 - 2*u2 - u - 0.2*u + 1.6*u^2 - u^3;
subs(exp, {x, L, L1}, {[1.5 1.6], 100, 8})

[ 发自手机版 http://muchong.com/3g ]
回复此楼

» 猜你喜欢

» 本主题相关价值贴推荐,对您同样有帮助:

已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

dbb627

荣誉版主 (著名写手)

【答案】应助回帖

感谢参与,应助指数 +1
exp是matlab的保留关键字,不可作为变量名。
The more you learn, the more you know, the more you know, and the more you forget. The more you forget, the less you know. So why bother to learn.
2楼2014-10-10 09:34:04
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

柱子234

新虫 (小有名气)

ben_ladeng: 求助贴没有EPI奖励。 2015-06-30 00:13:23
提示说维数不对

[ 发自手机版 http://muchong.com/3g ]
3楼2014-10-10 09:49:49
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

dbb627

荣誉版主 (著名写手)

【答案】应助回帖

★ ★ ★ ★ ★ ★ ★ ★
柱子234: 金币+6 2014-10-10 14:39:55
ben_ladeng: 金币+2, 辛苦了 2015-06-30 00:13:30
syms x L L1;
y = sym('x - L/2');
u = sym('(-tanh(x-L/2-L1) + tanh(x-L/2+L1))*cos(x-L/2)');
u1 = diff(u,'x');
u2 = diff(u1, 'x');
u3 = diff(u2, 'x');
u4 = diff(u3, 'x');
f = -u4 - 2*u2 - u - 0.2*u + 1.6*u^2 - u^3;
subs(f, {x, L, L1}, {1.5, 100, 8})
subs(f, {x, L, L1}, {1.6, 100, 8})
The more you learn, the more you know, the more you know, and the more you forget. The more you forget, the less you know. So why bother to learn.
4楼2014-10-10 14:05:28
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
相关版块跳转 我要订阅楼主 柱子234 的主题更新
信息提示
请填处理意见