MATLAB: How write LIMITED EDITION matlab script

clear scriptexpire dateexpire.limited edition

I have to write a matlab script for my friend… I have to put some logic by that script(pcode) will be expire after some time… By using simple clock and datenum functions it can be possible to but it can be hack by changing system time… I'm looking for other logics…
Possible solutions…(after expire date) 1)deleting pcode script 2)clear and rewrite another content in exciting script… Please Help…

Best Answer

It does not sound like this is much of a friend, if you will only be their friend for a very short time. After all, friendship is one thing, but there are limits. So you can be my friend until, how about next Tuesday, at midnight?
And, of course, you expect that your "friend" will do their best to disobey your limits, by hacking your code in anyway possible. A great pair of great friends.
Of course, you can put code in there to delete your m-file after it runs. I suppose you can find the true date by use of a urlread on some site online.
Personally, I'd look for a better set of friends. Unless you charge your friends for the right to be your "friend". I know that activity has some common name, but I can't think of it at the moment. It is a rather old occupation though. :) :) (Why not just admit to us that you want to sell a limited term license for your code?)