i am getting not enough input arguments error for the below code
조회 수: 1 (최근 30일)
이전 댓글 표시
function dx = m(t,x)
dx=zeros(4,1);
dx(1) = -(1/(8200*47*1e-9))*x(2);
dx(2) = (((x(3)-x(2))/2000) -(0.667e-3 + 0.029e-3*x(1).*x(1)*3.*x(2)))/6.8e-9;
dx(3) = ((x(2)-x(3))/2000 - x(4))/68e-9;
dx(4) = x(3)/18e-3;
[t,x] = ode15s(m,[0 50],[0 0.11 0.11 0]);
plot(x(:,2),x(:,3))
my error is like
Not enough input arguments.
Error in m (line 4)
dx(1) = -(1/(8200*47*1e-9))*x(2);
Error in untitled4 (line 3)
[t,x] = ode15s(m,[0 50],[0 0.11 0.11 0]);
>>
댓글 수: 0
채택된 답변
DGM
2022년 2월 12일
[t,x] = ode15s(@m,[0 50],[0 0.11 0.11 0]);
plot(x(:,2),x(:,3))
function dx = m(t,x)
dx=zeros(4,1);
dx(1) = -(1/(8200*47*1e-9))*x(2);
dx(2) = (((x(3)-x(2))/2000) -(0.667e-3 + 0.029e-3*x(1).*x(1)*3.*x(2)))/6.8e-9;
dx(3) = ((x(2)-x(3))/2000 - x(4))/68e-9;
dx(4) = x(3)/18e-3;
end
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Image Processing Toolbox에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!