Not enough input arguments.
古いコメントを表示
Dear everyone,
I hope you are having a great day.
I found a code attached to a research whom his developer advices that is working regarding modelling biochemical process. However. when trying running it, I found some problems.
One is when I run the following function
function y1 = ADDE(t,y)
y1 = zeros(size(y));
and so on giving equations for y1(elements)
comes an error of "Not enough input arguments".
So should I define y first? because it is not performed in the orginial code.
Thanks
14 件のコメント
Star Strider
2021 年 9 月 7 日
That function appears to be designed to use the MATLAB numeric differential equation integrators (such as ode45, or with a biochemical model, more likely ode15s).
If you use it in that context, it should work correctly, without any changes being made to it.
Check the paper to be certain that is how it is intended to be used.
.
Mohamed Eisa
2021 年 9 月 7 日
Mohamed Eisa
2021 年 9 月 7 日
Star Strider
2021 年 9 月 7 日
My pleasure.
It would be helpful if you could post / attach a .pdf version of the complete paper (including any necessary supplements, since they usually contain the appendices with data and code).
Mohamed Eisa
2021 年 9 月 8 日
編集済み: Mohamed Eisa
2021 年 9 月 8 日
Walter Roberson
2021 年 9 月 8 日
To use that code you first have to run globalvariables in order to read data files and set up the global variables.
But after that, you need code that runs the ode15s function, and you have not posted that code.
Do not run ADDE by itself. You would need a call that looked more like
ode15s(@ADDE, tspan,initial_conditions)
and notice the @ there -- it is important! If you were to run
ode15s(ADDE, tspan,initial_conditions)
without the @ then you would get the error message you show.
Mohamed Eisa
2021 年 9 月 8 日
Walter Roberson
2021 年 9 月 8 日
Please post the code you use to make the ode15s call.
Mohamed Eisa
2021 年 9 月 8 日
編集済み: Mohamed Eisa
2021 年 9 月 8 日
Walter Roberson
2021 年 9 月 8 日
First you need to go to
function ad(tspan,u)
format long
[t,y] = ode15s(ADDE,tspan,u);
and change that to
function ad(tspan,u)
format long
[t,y] = ode15s(@ADDE,tspan,u);
after that, run the function that sets the global variables.
Once the global variables have been set, at the command line invoke
global tspan u
ad(tspan,u)
Mohamed Eisa
2021 年 9 月 8 日
Walter Roberson
2021 年 9 月 8 日
There are two references to the undefined variable N_aaY_aa
(There are other problems that I spent some time cleaning up, but this one I cannot deduce the value of.)
Mohamed Eisa
2021 年 9 月 8 日
Walter Roberson
2021 年 9 月 8 日
I would prefer if you posted the definition of N_aaY_aa so I can do more clean up and testing.
回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Programming についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!