File addressing of code for MATLAB compiler -


In my code, there are some functions like imshow or fopen files I need to address when I use my program in MATLAB, to address me as pwd like imshow ([pwd '/image.jpg']) And run the program and work correctly, but when I have compiled my program after installing the shortcut in the desktop (redistribution), Programmed an error message that my program can not find the image.jpg . When I check the address of the search, it is the same:

  c: / user / desktop / image JPG  

I have read this page but I do not know how to use this address

Apart from this, I do not know that MATLAB Where should I add these files (images and texts) to the compiler options I or file installed with your application

The reason for this is that Your image is not in your current path (i.e. desktop in this case).

In the images you want to use, you should include the image in "employed" and "helpful resources" and refer to the image in your script / function, as specified in the link:

  ifdeployed imagepath = [ctfroot filesep 'image.jpg']; Else imagepath = [PWD file 'image.jpg']; End% Now use the image path such as this [PWD file 'image.jpg'] [A] = read (image path);  

The other option includes the file (image.jpg), which is in the same path as your final executable, because you are calling the image from PWD.


Comments

Popular posts from this blog

Member with no value in F# -

java - Joda Time Interval Not returning what I expect -

c# - Showing a SelectedItem's Property -