【问题标题】:Calculating derivative and integration using matlab使用matlab计算导数和积分
【发布时间】:2011-08-17 11:40:17
【问题描述】:

我正在尝试查找函数的二阶导数,但在初始化符号时出现以下错误:

Error using ==> subsindex
Function 'subsindex' is not defined for values of class 'sym'.

我使用的命令是:

syms x a b c L;
u = (a*x(x-L))+(b*x((x^2)-(L^2)))+(c*x((x^3)-(L^3)));

u”是我的功能。

【问题讨论】:

  • 得到了答案,是括号错误。

标签: matlab integration derivative


【解决方案1】:

我对 MATLAB 的符号功能了解不多,但该错误来自于

x(x-L)

MATLAB 将哪个解释为索引操作。你是说那里的乘法吗?即

x*(x-L)

【讨论】:

  • 哦,刚刚看到你的评论。无论如何,我会在这里留下答案,因为我认为它更明确地说明了问题。
猜你喜欢
  • 2021-06-20
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2018-03-25
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多