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 Ansicht (letzte 30 Tage)
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?

Akzeptierte Antwort

John D'Errico
John D'Errico am 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.

Weitere Antworten (0)

Kategorien

Mehr zu MATLAB Compiler finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by