How can I make a 'trial version' of a matlab GUI

前端 未结 1 1876
南笙
南笙 2021-01-13 16:50

My aim is to make a GUI, then by using deploytool to make an exe file from it. Since I don\'t want the user to be able to use it for ever I want to make it as a trial versio

1条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-01-13 17:29

    Using the computer's clock seems a reasonable way to go. Sure, the user than thwart that by changing the clock, but this will most likely create sufficient inconvenience that they rather pay the reasonable price of the software.

    Simply put the following inside the OpeningFcn of your GUI

    expiryDate = '2012-12-31';
    
    if now > datenum(expiryDate)
        h = errordlg('please upgrade to a full license');
        uiwait(h)
        return %# or throw an error
    end
    

    0 讨论(0)
提交回复
热议问题