Hello, Shaul Salomon. I suggest testing for an empty return variable w, rather than requiring w = [], which is not the same thing. See Solution 1538012, which produces a 0×1 empty column vector. —DIV
Back to basics 21 - Matrix replicating
1052 Solvers
2818 Solvers
Create matrix of replicated elements
322 Solvers
509 Solvers
275 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!