I wonder what the inside [] represents when using ode.

조회 수: 1 (최근 30일)
채원 이
채원 이 2022년 3월 23일
댓글: 채원 이 2022년 3월 30일
When using ode, I used the following format.
[t C] = ode45(@Columnfun_ED_BFDM2_KH_0302,tspan,IC,opts,dz,column_Number,Nz,e,Q_z,Q_D,Q_E,Q_R,Q_F,C_F,A,F,H,tact,N,L);
[t C q] = ode45(@Columnfun_ED_BFDM2_KH_0302,tspan,IC,opts,dz,column_Number,Nz,e,Q_z,Q_D,Q_E,Q_R,Q_F,C_F,A,F,H,tact,N,L);
I accidentally put several variables inside [], but the value is strange, so I ask. Is the order in [] set?
For example, if you enter [ t C ], the function seems to call out the variables t and C.
If you enter [t C q], t and C seem to be called by ode. I wonder what q stands for at this time!!
  댓글 수: 2
Stephen23
Stephen23 2022년 3월 23일
편집: Stephen23 2022년 3월 23일
"When using ode, I used the following format."
Do not use that deprecated syntax. The best way to pass extra parameters is to use an anonymous function, exactly as the ODE45 documentation recommends:
"Is the order in [] set?"
Yes, and what its output arguments are is explained in the ODE45 documentation.
"If you enter [t C q], t and C seem to be called by ode. I wonder what q stands for at this time!!"
Rather than wondering, guessing, and then asking random strangers on the internet it is much simpler to read the ODE45 documentation, which explains what every output argument is:
The ODE45 documentation has a section entitled "Output Arguments", which explains the outputs.
채원 이
채원 이 2022년 3월 30일
Thanks for the reply.

댓글을 달려면 로그인하십시오.

답변 (1개)

Cris LaPierre
Cris LaPierre 2022년 3월 23일
See this syntax in the documentation for ode45
  댓글 수: 1
채원 이
채원 이 2022년 3월 30일
Thanks for the reply. As I said above, I looked it up and figured it out.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Ordinary Differential Equations에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by