Info

La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.

running the below code

3 visualizaciones (últimos 30 días)
Semih Isik
Semih Isik el 29 de Dic. de 2022
Cerrada: Jan el 29 de Dic. de 2022
I am getting a lot of error for the code below. Is there anyone to help me out to run this?
Thanks so much!
NumberOfTrials = 1000000;
TimeStep = 100;
lambda = 1,count = 1,LifeTime = 1;
LifeTimeStep = LifeTime/TimeStep;
for (i=0;i<LifeTime;i+=Step
Time = i;
FailedControllers = 0;
for (j=1;j<NumberOfTrials;j++) do
ReliabilityThreshold = lambda * exp(-i);
fail-count = 0;
for (k=1;k<=4;k++) do
if (random(unif,0,lambda) > ReliabilityThreshold) then
ControllerAvailability[k] = 1;
else
ControllerAvailability[k] = 0;
end
if (CheckForFailure(ControllerAvailability[])) then
FailedControllers ++;
Availability(count) = (NumberOfTrials - FailedControllers)/NumberOfTrials;
Availability-t(count) = i;
count ++;
end
end
  1 comentario
Les Beckham
Les Beckham el 29 de Dic. de 2022
This is not Matlab code nor is it valid C/C++ code. Looks like a mash-up of the two, perhaps.
I suggest you spend a couple of hours learning the basics of Matlab by taking this free online tutorial course:

Respuestas (0)

La pregunta está cerrada.

Etiquetas

Productos


Versión

R2021b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by