How to implement the algorithm in matlab

2 vues (au cours des 30 derniers jours)
jy tan
jy tan le 30 Déc 2011
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 commentaires
jy tan
jy tan le 6 Jan 2012
is there a function to add a number as a member inside the array?
Walter Roberson
Walter Roberson le 6 Jan 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;

Connectez-vous pour commenter.

Réponses (0)

Catégories

En savoir plus sur Operators and Elementary Operations dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by