How to implement the algorithm in matlab

1.Let's say i need an array to store the previous breakdown nodes: Storebreakdown=[0 0 0 0 0 ...](hundreds of zeros)
then if breakdown, how to add inside the Storebreakdown array?
2. After qn 1 is completed, how to implement this:
if node is not in Storebreakdown array { perform action }

5 comentarios

jy tan
jy tan el 3 de En. de 2012
nobody knows?
Walter Roberson
Walter Roberson el 3 de En. de 2012
What are "breakdown nodes" ??
Question 2 sounds like an application of ismember()
jy tan
jy tan el 6 de En. de 2012
each node has a number, so if it breakdowns, i want to store it in the breakdown array, is it possible to do this with ismember()?
jy tan
jy tan el 6 de En. de 2012
is there a function to add a number as a member inside the array?
Walter Roberson
Walter Roberson el 6 de En. de 2012
ismember() is for checking to see if a number is already in an array. ismember(29, a)
The function for assigning a member inside an array is subsasgn() which is not often called directly. Instead, people usually invoke matrix assignment syntax, such as a(5) = 29;

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Operators and Elementary Operations en Centro de ayuda y File Exchange.

Etiquetas

Preguntada:

el 30 de Dic. de 2011

Community Treasure Hunt

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

Start Hunting!

Translated by