Filter löschen
Filter löschen

[~,ant_est] = max(abs(z));

1 Ansicht (letzte 30 Tage)
Kartickeyan V
Kartickeyan V am 26 Jan. 2017
Kommentiert: Walter Roberson am 26 Jan. 2017
When i used this above code in my matlab version 2009a it is showing an error Expression or statement is incorrect--possibly unbalanced (, {, or [.
help me to correct it
  2 Kommentare
Massimo Zanetti
Massimo Zanetti am 26 Jan. 2017
Bearbeitet: Massimo Zanetti am 26 Jan. 2017
Most probably the error is not related to this line of code. Please, post more details (e.g., the piece of code and the whole matlab error message, including the line at which the error is found).
James Tursa
James Tursa am 26 Jan. 2017
Bearbeitet: James Tursa am 26 Jan. 2017
I.e., several lines above and below the offending line.

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

Walter Roberson
Walter Roberson am 26 Jan. 2017
The ~ operator was not implemented until R2009b. You can replace that code with
[UnUsEdVaRiAbLe_To_IgNoRe, ant_est] = max(abs(z));
clear UnUsEdVaRiAbLe_To_IgNoRe
  6 Kommentare
Adam
Adam am 26 Jan. 2017
Don't clear the variable if time is more of an issue than memory. clear instructions take a lot of time, relatively.
Walter Roberson
Walter Roberson am 26 Jan. 2017
I would be unlikely to clear the junk variable myself, unless I was short on memory. The "clear" I showed is the logical equivalent, not the practical equivalent.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Numeric Types 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