MATLAB超过了最大数量

时间:2018-10-01 14:38:27

标签: matlab matlab-guide matlab-compiler

我正在研究几年前写的一个旧的Matlab程序(在MATLAB 2012上)。它具有一些GUI,过去可以正常工作,但是现在在MATLAB 2017上,我遇到了一些奇怪的错误消息:

超过了最大光源数(8)

我什至不知道那是什么意思。

以下是发生错误的一些代码:

while ~button
    pause(1)    
    % Get the position and size of the probe
    for i=1:2
        auxp = str2double(get(positionEdit(i), 'String'));
        auxd = str2double(get(dimensionEdit(i), 'String'));
        if isnan(auxp)
            position(i) = 0.0;
        else
            position(i) = auxp;
        end
        if isnan(auxd)
            dimension(i) = 0.0;
        else
            dimension(i) = auxd;
        end
    end

    selRadioButton=get(hBtnGrp,'SelectedObject');

    % Get the azimuth and elevation   
    azimuth = str2double(get(azEdit, 'String'));
    elevation=str2double(get(elEdit, 'String'));

    % If 'rotate' is checked, lateral and transversal position are inverted
    if get(rotationCheckBox,'Value') == 1
        dimension=[dimension(2),dimension(1)];
    end

    % checks if there was any change in the position or size of the probe
    if any(lastPosDim~=[position, dimension, selRadioButton]) && all(~isnan([position dimension]))
        setTransducerPosSize(position,dimension);
        lastPosDim=[selRadioButton];
        delete(p(numStructures+1))
        p(numStructures+1) = patch(isosurface(trans==1,0));
        set(p(numStructures+1),'EdgeColor','none','facealpha',.3,'facecolor','blue');
        axis equal; camlight; lighting gouraud
    end

    % Checks if here was any change in the visuazilation settings (eleveation and azimuth)
    if any(lastAzEl~=[azimuth elevation]) && all(~isnan([azimuth elevation]))
        view(azimuth,elevation)
        lastAzEl=[azimuth elevation];
    end

end

,这是错误消息:

> In defaulterrorcallback (line 12)
  In USgetPhaseInformation (line 193)
  In RunUSSim (line 72) 
Warning: Error updating Light.

第193行是while循环中的“暂停”命令。我应该做些什么?这是什么错误,我该如何解决?

预先感谢

0 个答案:

没有答案