0

In MATLAB when we want to use a function with some outputs (more than one), and we use ~ instead of those that we do not want. For example like the following:\

[Output we need,~,~,~]=function name(input)

Now the question is , when using ~ means that these outputs do not construct (i.e. so faster in some cases) or just they are not as the output?

Rosa
  • 1,502
  • 1
    They're still constructed. In particular, [L,U,~]=lu(A) and [L,U]=lu(A) have different behavior. – Ian Aug 15 '16 at 14:20
  • 1
    For a possibly outdated answer see this – user66081 Aug 15 '16 at 14:23
  • 2
    The ~ in MATLAB means ignore, so depending on the function, there could be something constructed that is not stored after the function returns. In that case, the object is still constructed when the function is executed, but it is destroyed after the function returns. This may not save on time, but saves on memory space in the long run. – Carser Aug 15 '16 at 14:23

0 Answers0