Mehmet Orhan (21 April 2006) wrote Initially I had the following code: [samples, stats, structArray] = matbugs(dataStruct, fullfile(pwd, 'E:\Mehmet\Work\MCMC\models\model1.txt'), ....... I was able to avoid the error when I added the following line to shorten the 'pwd' length: cd ('E:\Mehmet\Work\MCMC\models'); %changes the 'pwd' to this directory% Then the part of the code that calls MATBUGS becomes: [samples, stats, structArray] = matbugs(dataStruct, fullfile(pwd, 'model1.txt'), ........ which resulted in a problem free execution of WINBUGS through MATBUGS for me.