Error in using the function

My function is f=ncs1_dae(x) and when I run the function by entering the initial values, tspan,options, etc, I get an error saying "too many input arguments" . I checked my input values, initial conditions and they all seem correct. I am using ode15s to solve a system of DAE'S . It consists of 6 differential equations and 12 algebraic equations. All of them are interdependent and need to be solved simultaneously. Please help me with some suggestions. I have gone through a lot of examples. codes but nothing seems to work.
Thanks!

 採用された回答

Jan
Jan 2012 年 9 月 28 日
編集済み: Jan 2012 年 9 月 28 日

0 投票

It would be a good idea to post the code instead of a textual description. But most likely "f = ncs1_dae(x)" is the problem already, because it accepts 1 input only, while the integrator provides at least the current position and the time, so you need 2 inputs.
The standard method to reveal such problems is using the debugger:
dbstop if error
Then Matlab stops when the error occurres and you can inspect the current variables and the calling hierarchy.

その他の回答 (1 件)

Urvi
Urvi 2012 年 9 月 28 日

0 投票

I am sorry if you are unable to understand the problem but I really need some tips to solve this. If you want I could send the m files to you. Thanks!

カテゴリ

ヘルプ センター および File ExchangeNumerical Integration and Differential Equations についてさらに検索

質問済み:

2012 年 9 月 28 日

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by