To set the environment variable, do the following (assuming you're using Windows XP - Vista/Win7 are not much different):
1. Close Matlab if it's open
2. Left-click on the Start menu
3. Right-click on "My Computer" and select "Properties"
4. Select the "Advanced" tab and click "Environment Variables"
5. Click New below System variables
6. Enter Variable name as DSPBUILDER_ROOTDIR and Variable value as
C:\altera\DSPBuilder\Altlib 7. Click OK and then OK again.
8. Now start MATLAB and the variable should be set.
You can verify it's set by typing "getenv DSPBUILDER_ROOTDIR" at the matlab prompt.