필터 지우기
필터 지우기

storing only part of the output of a function with multiple outputs

조회 수: 2 (최근 30일)
Suppose you have a function with many outputs, e.g.,
[C,ia] = setdiff(A,B)
I am only interested in ia and not C. Is there some way of only calling on ia without storing C? Thank you very much!

채택된 답변

Star Strider
Star Strider 2015년 3월 3일
Use the tilde ‘~’ to suppress outputs you don’t need.
In this instance:
[~,ia] = setdiff(A,B)

추가 답변 (1개)

Jeong Ho
Jeong Ho 2015년 3월 3일
Dear Star Strider, Thank you so much; works like a charm!
Best, John

카테고리

Help CenterFile Exchange에서 Structures에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by