Compiled version not working because of path
12 views (last 30 days)
I have compiled similar programs successfully with earlier versions (e.g. 2017a), but now in 2019b have this issue.
Get this message in testing the software:
Here is the code that may be a problem. I also use the utility uipickfiles() from file exchange. Never use "addpath" itself. How do you find files if not like this?
% Plot the logo
[~,lingo] = dos('set username');
login = lingo(10:end-1);
% Plot the background and the logo: Background on axes2, logo on axes3
dir_name = ['C:\Users\',login,'\Desktop'];
wiggle_file_name = [dir_name,'\wiggles3.jpg'];
logo_file_name = [dir_name,'\ctrl_v_logo.jpg'];
% imshow(logo_file_name); % Overwrites axes2
Any thoughts? This part is just to put a logo on the screen to start the program -- used to work! I'm not sure if the error occurs elsewhere, though.
I advise the user to put the installer on the Desktop as well as these figures.
Allen on 25 Jan 2020
If you are certain that the image you are looking for is always going to be on the Desktop and your OS is Win10, you can try the following line of code. This should work for Win8 as well, but am not certain about other OSs. I use this line of code frequently with trying to setup a splahscreen for my apps and executables, and have done so in the latest version of MATLAB.
dir_name = ['C:\Users\',getenv('USERNAME'),'\Desktop\'];