필터 지우기
필터 지우기

hi, what does ~ mean in the following code

조회 수: 3 (최근 30일)
Muna Shehan
Muna Shehan 2014년 9월 1일
댓글: Guillaume 2014년 9월 1일
[t02,~] = ode23(@(t,x)system.deriv(t,x,0, xd, @(t)lookup_u(zdot,t)), [0 2], init.fun(xd),opt);

채택된 답변

Image Analyst
Image Analyst 2014년 9월 1일
It means to ignore that output. Don't take the second output and assign it to any variable - just ignore it completely, throw it away. You could also just do
t02 = ode23(.............
Since the ignored output is the later one. You can't do that if you want to ignore the first one and keep the second one though.
  댓글 수: 2
Muna Shehan
Muna Shehan 2014년 9월 1일
Thanks for your response
Guillaume
Guillaume 2014년 9월 1일
Note that for ode23
[t02, ~] = ode23(...
and
t02 = ode23(...
are equivalent. This is not the case with all functions, e.g.
idx = find(...
[row, ~] = find(...
The first find returns a linear index. The second, a row and column where you ignore the column.

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

추가 답변 (0개)

카테고리

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