I've tested this only on R2010a, where it passes all my unit tests. (actually, I'll leave it in, because that would turn the answer into a link-only reply, as rightfully remarked by Andy Clifton). I'll post this on the FEX, and after it's approved, I'll place a link to it here.ĮDIT 1 they approved my submission, which can be found here or directly from my GitHub.
DISABLE DEFAULTINTERACTIVITY MATLAB 2017 UPDATE
I will submit a ticket to MathWorks and update the question if I hear back unless someone has another workaround. with the paths added back, n = gpuDeviceCounts still throws the first error).
DISABLE DEFAULTINTERACTIVITY MATLAB 2017 INSTALL
The first is unexpected and could happen for any number of reasons such as a corrupt install or a stupid typo on my part (e.g.
![disable defaultinteractivity matlab 2017 disable defaultinteractivity matlab 2017](https://www.mathworks.com/help/matlab/creating_plots/axtoolbarbtn_state.png)
The second one is expected and if I could easily and deliberately throw that error, I could see what exception to test for in a try/catch block and behave appropriately. These products offer 'gpuDeviceCount':ĭifferent errors, different exceptions thrown. GpuDeviceCount is not included in your installed products. Undefined function or variable 'gpuDeviceCount'.īut when I asked a friend, who does not have the parallel toolbox installed, to type in the same command, he got the following: > gpuDeviceCount For instance, after I removed the directories, I get the following behavior: > n = gpuDeviceCount It also throws different errors, and so this method cannot be used to adequately test the behavior in my program. Once that was done, typing in ver still shows that the Parallel Toolbox is installed. First of all, the toolbox is not in a single directory, it is in several (I had to rmpath 11 directories for Parallel Toolbox and I don't really know if I got them all). Simply removing the path does not disable the toolbox.
![disable defaultinteractivity matlab 2017 disable defaultinteractivity matlab 2017](https://undocumentedmatlab.com/images/Toolstrip_popup_figure.png)
Is there any way, short of repeatedly uninstalling and then reinstalling the toolbox, or else buying a second license and installing on a second computer (or the same computer with a different username), to temporarily make MATLAB think that it isn't available?įrom the comments to the question, it appears the answer to my question is "no". To generalize the situation, I would like to be able to test the behavior of an application when a toolbox dependency is not met so I can either provide a meaningful message to the user for why they can't use my application or else provide a workaround. The problem is that since I have the toolbox installed, I never get an error when I try to use a parallel toolbox function, so I can't test the failure points. I am writing an application that will be sent out to customers who may not have that toolbox installed and I would like to write my application so that it fails gracefully (i.e. I have a standalone license for MATLAB R2016b with the Parallel Toolbox.