Problemas no Matlab2015a

De MediaWiki do Campus São José
Ir para navegação Ir para pesquisar

OpenGL

Consulte os helps da Mathworks

Seguem abaixo algumas dicas para o uso e problemas com o OpenGL:

Se o Matlab 2015a parece muito lento, verifique qual é o renderizador de OpenGL que está sendo utilizado:

opengl('info')

Se for hardware aparecerá Software: 'false' no display:

                         Version: '3.0 Mesa 10.1.3'
                          Vendor: 'X.Org'
                        Renderer: 'Gallium 0.4 on AMD RS880'
                  MaxTextureSize: 8192
                          Visual: 'Visual 0x214, (RGBA 32 bits (8 8 8 8), Z depth 16 bits, Hardware acceleration, Double buffer, Antialias 8 samp...'
                        Software: 'false'
       SupportsGraphicsSmoothing: 1
   SupportsDepthPeelTransparency: 1
      SupportsAlignVertexCenters: 1
                      Extensions: {188x1 cell}
              MaxFrameBufferSize: 8192

Se for software aparecerá Software: 'true' no display:

                         Version: '2.1 Mesa 7.2'
                          Vendor: 'Brian Paul'
                        Renderer: 'Mesa X11'
                  MaxTextureSize: 2048
                          Visual: 'Visual 0x63, (RGBA 32 bits (8 8 8 8), Z depth 16 bits, Hardware acceleration, Double buffer, Antialias 0 samples)'
                        Software: 'true'
       SupportsGraphicsSmoothing: 0
   SupportsDepthPeelTransparency: 1
      SupportsAlignVertexCenters: 0
                      Extensions: {114x1 cell}
              MaxFrameBufferSize: 4096

Para trocar entre a renderização por software ou hardware use os comandos:

matlab -nosoftwareopengl
matlab -softwareopengl

Se for software ou hardware estiver lento, é possível também executar o matlab sem o openGL

matlab -noopengl

Neste caso a resposta a

opengl('info')

será:

                         Version: 
                          Vendor: 
                        Renderer: 'None'
                  MaxTextureSize: 0
                          Visual: 
                        Software: 1
       SupportsGraphicsSmoothing: 0
   SupportsDepthPeelTransparency: 0
      SupportsAlignVertexCenters: 0
                      Extensions: {}
              MaxFrameBufferSize: 0

BUG DO MATLAB 2015a

O scatterplot não funciona na renderização por hardware dessa configuração:

                         Version: '3.0 Mesa 10.1.3'
                          Vendor: 'X.Org'
                        Renderer: 'Gallium 0.4 on AMD RS880'

Para testar digite o comando:

scatterplot([+1 -1 -i +i])

Se aparecerem os pontos no grafico, então está funcionando, senão, a solução será usar a renderização por software:

matlab -softwareopengl

ou não usar o openGl:

matlab -noopengl

Outro teste:

hMod = comm.QPSKModulator;
Rup = 16;  % upsampling rate
hRCTxFilter = comm.RaisedCosineTransmitFilter(...
'Shape','Normal', ...
'RolloffFactor',0.5, ...
'FilterSpanInSymbols',Rup, ...
'OutputSamplesPerSymbol',Rup);
data = randi([0 3],100,1);
modData = step(hMod,data);
hScope = comm.ConstellationDiagram('SamplesPerSymbol',Rup);
txSig = step(hRCTxFilter,modData);
step(hScope,txSig)

USAR MATLAB 2014a

Na versão 2014a não há esse bug, mesmo que esteja sendo usado o mesmo renderizador OpenGL em hardware.

opengl('info')
Version         = 3.0 Mesa 10.1.3
Vendor          = X.Org
Renderer        = Gallium 0.4 on AMD RS880
MaxTextureSize  = 8192
Visual          = 0x214 (TrueColor, depth 24, RGB mask 0xff0000 0xff00 0x00ff)
Software        = false
# of Extensions = 189
Driver Bug Workarounds:
OpenGLBitmapZbufferBug    = 0
OpenGLWobbleTesselatorBug = 0
OpenGLLineSmoothingBug    = 0
OpenGLClippedImageBug     = 0
OpenGLEraseModeBug        = 0