Sorry but it is not usefull as this is exactly what fprintf is already doing.
However, it could be nice to be able to catch everything that is written in the command window without using evalc. If you have an idea, please submit it. (for example with a nice overload of fprintf)
Hello,
I was looking for this kind of code. Thank you very much it is very helpfull.... but it does not work well. If you remove the outlier, you should find back the rectangle. And sometime (quite often) it is not the case. I've not found yet why there is a bug. I will use the John D'Errico's code instead at the moement.
A nice refinement of my code, using the same ideas that made it efficient (i.e, we need only look at the edges from the convex hull) but then avoiding an explicit loop (by use of a vectorized form) over those edges. Well done by Julien.
I corrected the bug (wait a few days for it to be updated on this site). Actually it is strange that it worked before...
Thanks for the remark.
John, if you want to update your file with my vectorized algorithm, I don't mind. Yours is more polished.
Hello,
I was looking for this kind of code. Thank you very much it is very helpfull.... but it does not work well. If you remove the outlier, you should find back the rectangle. And sometime (quite often) it is not the case. I've not found yet why there is a bug. I will use the John D'Errico's code instead at the moement.
A nice refinement of my code, using the same ideas that made it efficient (i.e, we need only look at the edges from the convex hull) but then avoiding an explicit loop (by use of a vectorized form) over those edges. Well done by Julien.
Comment only