MatLab error:Exceeded the maximum number (8) of light sources - matlab

I am trying to make a movie by plotting isosurf of a my data at each time step. However, I get the following error and the code runs very slow. The error is:
[Warning: Error updating Light.
Exceeded the maximum number (8) of light sources
The line that the error refers to is the following:
drawnow;
I searched on how to solve this problem but did not found any solution. The same problem has been reported in the following link:
https://uk.mathworks.com/matlabcentral/answers/471429-exceeded-the-maximum-number-8-of-[light-sources-when-trying-to-plot-two-shrinking-spheres-on-the][1]
Could some one please help me with removing this error?

Related

The block 'xyz/If Action Normal/In1' has a discrete sample time that does not match the sample time 0 of the If block 'abc' controlling its execution

I've run into the following error message from Simulink:
The block 'xyz/If Action Normal/In1' has a discrete sample time that does not match the sample time 0 of the If block 'abc' controlling its execution
My solver configuration is variable step/auto, and the environment could be seen at the end of this post.
I tried a few methods:
try to locate the error by replacing/comment out blocks;
try to change the port driving if-action block;
try to remove all discrete blocks;
Any suggestion is highly appreciated.
This error is hidden behind a Matlab known bug. Basically, when I tried to add a rate transition to make the same time consistent. The system crashed.
The crash is because of a known Matlab bug. A zero-holder needs to be added following unit delay blocks. After this, I could add rate transit block without model crashing.

export to workspace problems using rtwin.tlc

I'm using Sensoray 626 card with simulink real time (rtwin), the problem is that when I try to plot some graph using scope block in real time no more than 800 points are plotted. In other words, it seems that the scope updates the graph by deleting the old points and starting new frame from zero again and again.
I tried to export data to be plotted from simulink to workspace in order to plot it after the real-time simulation is finished but, unfortunately, the same problem occurred. I have got no more than 800 points in workspace (in some attempts I've got less than 200).
The weird thing is that such problem doesn't occur with the same matlab version and with the same pc but using das 1002 card instead. both The scope and save-to-workspace blocks work well.
I'm using matlab 2009 on Windows Xp.
I would have used das 1002 card but it doesn't contain any encoder.
PS: solver configuration was properly set , necessary libraries were loaded.
Any help that can solve this problem would be appreciated.
thanks in advance.
solver configuration
solver
scope properties
simple simulink example
The Scope is only able to display an amount of samples equal to external
mode buffer length. So please go to Tools->External Mode Control
Panel->Signal & Triggering and check the Duration parameter there. I'd
bet it is 1000, so 1000 samples at 0.001 s sampling rate gives the 1
second of data you get. If you want more, try to increase this number.

How to increase the vehicle density in Veins-lte during simulation

I would like to increase the number of vehicles per area i.e vehicle density. In case of veins; the number of vehilces as well as speed can be increased or decreased via erlagen.rou.xml. I tried to change the number of vehicles from heterogeneous.rou.xml, but i faced some errors like :
Error in module (HeterogeneousToLTE) scenario.node[1].heterogeneousToLTE (id=89) at event #192976, t=20.6: IPvXAddressResolver: module `node[21]' not found
How to solve this issue?
Thanks
To increase the number of vehicles you have to generate/build a new scenario for SUMO. Veins LTE only covers the network simulation part.
The error you posted has a different reason: You are trying to send a message to a node that does not yet exist. To fix this, you have to change either the provided SimpleApp.cc, or even better, write your own application.

Matlab/Simulink Build error: Unable to honor user-specified priorities

I try to generate code with the embedded matlab coder from a Simulink model.
Then this error occurs: Unable to honor user-specified priorities.
It seems to me that this algebraic loop triggers this error. As you can see in the picture below, there are a higher execution-order at the sum as at the integrator.
I changed the continuous block integrator to an discrete, I put a memory block in the back-path, also an unit-delay-block. But nothing lead to success.
I hope you can give me some approaches to find out a workaround.
Regards
Alex

Matlab: error message running Quantisnp

I would like to run a program called QuantiSNP that used Matlab in its code. I am not familiar with Matlab at all. I got the below error message and no output. Any idea how to fix it? FYI, I don't have access to source code of the program....
??? Error using ==> chol Matrix must be positive definite.
MATLAB:posdef
Highly appreciate your help
Jean
It's very hard trying to answer your question without seeing any code but here is some general info about the problem you are facing:
What you see is a Matlab error message. I assume QuantiSNP is a compiled Matlab program so you probably can't debug it. In short it says that at some point the program is trying to calculate the Cholesky factorization using chol() function, but the matrix inside is not positive definite. Most of the time the problem happens because the matrix is actually zero, which in turn is [potentially] caused by an invalid input parameter
Check to see if the parameters you are using (1) are valid and (2) match your environment. If there is an input CSV or TXT file, make sure the path is correct. Make sure numbers make sense. Are there any zeros or extra lines somewhere that should not be there?
Depending on which version of QuantiSNP you have, you may have access to the --verbose switch. Add --verbose to the end of your command (for example quantisnp2.exe firstparam secondparam --verbose) to see some messages on the screen as the program runs through the data. See if you can figure out where it's failing and if it's related to your input parameters.
Take a look the QuantiSNP how-to page to make sure you understand the required parameters and the formatting of the input file.