Débutant en matlab : problème index must be logical
Résolu/Fermé
DoubelV
Messages postés
1
Date d'inscription
vendredi 30 mai 2014
Statut
Membre
Dernière intervention
30 mai 2014
-
30 mai 2014 à 20:31
DoubleV - 2 juin 2014 à 22:13
DoubleV - 2 juin 2014 à 22:13
A voir également:
- Débutant en matlab : problème index must be logical
- Logiciel de programmation pour débutant - Guide
- Logiciel montage vidéo débutant - Guide
- Apprendre le coran pour débutant (+ pdf) - Télécharger - Histoire & Religion
- Salaire mangaka débutant ✓ - Forum Loisirs / Divertissements
- Comment utiliser un ordinateur pour un débutant - Astuces et Solutions
2 réponses
JulienJust
Messages postés
149
Date d'inscription
mardi 25 juin 2013
Statut
Membre
Dernière intervention
2 septembre 2014
18
2 juin 2014 à 14:35
2 juin 2014 à 14:35
Bonjour,
Essaie plutôt ceci:
Cdlt
Essaie plutôt ceci:
N = 100;
g = zeros(1,N);
for n = 1:N
theta(n) = (pi/2)-n*pi/100;
if theta(n) < -0.5
g(n) = 0;
elseif theta(n) > 0.5
g(n) = 0;
else
g(n) = 1;
end
end
Cdlt