# MATLAB print eps



## gianD748 (Jan 31, 2010)

Hi guys,

I have installed matlab on a BSD machine; it worsks fine except the following problem. When I try to save a figure under a format different from .fig , for example eps, it brakes and diplays the following error:


```
Error using ==> print at 310
Can't load
'/usr/compat/usr/local/matlab/bin/ginx86/libmwdastudio.so':
/usr/lib/libGL.so.1: undefined symbol: XDamageAdd
```
Please, is here anyone that knows what should I do to correct this?

thank you very much!!!

gian


----------



## DutchDaemon (Jan 31, 2010)

I don't know Matlab, but is any of this relevant?


----------



## gianD748 (Feb 8, 2010)

*print*

... yes, I think that it is relevant, otherwise .... why I should ask an help??

... and if I need an help since there are some things that I do not understand, what should I do???

or may be you are just saying that I give the wrong information thus it is difficult to help me?

best

gian


----------



## DutchDaemon (Feb 8, 2010)

Did you notice the link in my 'is *this* relevant'?


----------



## foo_daemon (Feb 8, 2010)

Just some wild guesses here:
Do you have the port x11/libXdamage installed?  Have you tried rebuilding it along with graphics/libGLU ?


----------



## gianD748 (Feb 18, 2010)

*yes*

yes, these libs are installed.


----------



## gianD748 (Apr 27, 2010)

dear all,

I have find some imput on the web to solve the problem presented in my previous post: matlab on BSD do not export file.fig into file.eps or other formats.

there are 3 possibilities:

1) print_eps (http://webscripts.softpedia.com/script/Graphs-and-Charts/print-eps-58264.html)

2) exportfig.m (http://www.mathworks.com/company/newsletters/digest/june00/export/)

3) laprint (http://www.mathworks.de/matlabcentral/fileexchange/4638)



unfortunatley, none of these works. I find always the same error.

I have tryed to rebuild also the libXdamage library but the system gives to me the same error.

snif!

is there in the community of BSD users that uses matlab r2008a (for i386) that has the same problem?

what should I do?

many thanks

gian


----------



## gianD748 (Oct 1, 2010)

*MATLAB print eps: SOLVED*

Dear all,

a fiend of mine have helped me to solve the problem that I have shown in my previous post "MATLAB print eps". I rember the problem: Matlab in freeBSD OS. Some times it cannot be possible to use the command "print" in the Matlab script window and the system diplays the error that I described in my previous post or something like the following:

```
>> print('-dpng', '/home/D748/Desktop/Ampiezze_decay.pdf')
??? Error using ==> print at 310
Can't load '/usr/compat/linux/usr/local/matlab/bin/glnx86/libmwdastudio.so': libGLU.so.1: cannot
open shared object file: No such file or directory
```

It happens since Matlab tries to open linux libraries instead it finds freeBSD ones.

One possible solution (for FreeBSD 7.2 + KDE 3.5) is the following:

*1)* install linux-f10-dri that is a "Mesa LibGL runtime libraries and DRI drivers (linux fedora 10)". (To do that see at http://www.freebsd.org/doc/handbook/ports.html)

*2)* Make the following symbolic link:

```
# ln -s  /usr/compat/linux/usr/lib/libGL.so.1 /usr/lib/libGL.so.1
```

that's it. Start Matlab again. Now it should be able to print eps/png/pdf-figures!



g.


----------

