Effacer les filtres
Effacer les filtres

Clothesdryer=[1 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 0 0 0 0 1 1 1]; in debug mode when i bring curser on clothesdryer it show all 24 zeros,which i think should show the above string of zeros and one and not all zeros can any one tell what is the reason?

1 vue (au cours des 30 derniers jours)
Clothesdryer=[1 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 0 0 0 0 1 1 1]; in debug mode when i bring curser on clothesdryer it show all 24 zeros,which i think should show the above string of zeros and one and not all zeros can any one tell what is the reason?

Réponse acceptée

John D'Errico
John D'Errico le 28 Nov 2015
The reason? At that point in time, your vector is NOT what you think it is. It is indeed a vector of all zeros, AT THAT POINT IN YOUR CODE. The debugger does not lie.
Why? The true reason is in your code, and we are not privy to read your code if you do not provide it. My guess is that you do not appreciate the idea of function workspaces, or perhaps how variables are passed around. That is strictly a guess though.

Plus de réponses (0)

Catégories

En savoir plus sur MATLAB Compiler dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by