MATLAB: Change directory crash gui

directorygui

I make a gui using GUIDE, it has three different files of bmp pics.The problem is all the functions i wrote to these files only works in the same directory that i put the functions,the fig archive an m file. I was trying change directory using cd command ang uigetdir and does the change ,but ALL THE GUI DOES NOT RESPOND.ANY CLUE to fix that?

Best Answer

Don't do that. Create the full filename and use that when you call imread. See this GUI tutorial if you need an example:
Description
This GUI will help the novice user get up to speed very quickly on using GUI-based applications. Everything is laid out in a very simple Step 1, Step 2, Step 3, etc. layout. It is a very good starting point for a typical image analysis application. This application uses GUIDE to do the user interface design, and has most of the basic controls such as buttons, listboxes, checkboxes, radio buttons, scrollbars, etc. ............