scilab中求解常微分方程的问题

问题描述 投票:-3回答:1

enter image description here

现在它在scilab控制台中显示以下问题...enter image description here

[请告诉我我做错了什么并告诉解决方案。

matlab scilab
1个回答
0
投票

此行上的函数f的代码有问题

    dx(2) = -B*(1-x^2)*x(2)-w*w*x(1)

因为表达式-B*(1-x^2)*x(2)产生一个向量,并且您尝试将其分配给标量容器(此处为dx(2))。也许您想编写-B*(1-x(1)^2)*x(2)-B*(1-x(2)^2)*x(2)(即用其中一个组件替换x的第一次出现)?

© www.soinside.com 2019 - 2024. All rights reserved.