Write function with multiple output, like sort()
Mostrar comentarios más antiguos
B = sort(A);
[B, I] = sort(A);
How can I write such a function? Is it as simple as return both B and I, but the first line just uses B and ignore I, or there's some polymorphism trick under the hood?
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Data Type Identification en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!