storing only part of the output of a function with multiple outputs
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Jeong Ho
am 3 Mär. 2015
Kommentiert: Star Strider
am 4 Mär. 2015
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!
0 Kommentare
Akzeptierte Antwort
Star Strider
am 3 Mär. 2015
Use the tilde ‘~’ to suppress outputs you don’t need.
In this instance:
[~,ia] = setdiff(A,B)
0 Kommentare
Weitere Antworten (1)
Siehe auch
Kategorien
Mehr zu Structures finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!