Filter löschen
Filter löschen

what is meaning of this plzz tell me

3 Ansichten (letzte 30 Tage)
Mohd Shahrukh
Mohd Shahrukh am 21 Mär. 2018
Kommentiert: Star Strider am 26 Mär. 2018
feat=[]; class=[];

Akzeptierte Antwort

Star Strider
Star Strider am 21 Mär. 2018
Those assignments set the ‘feat’ and ‘class’ variables to empty arrays [].
Note that class (link) is a MATLAB function, and assigning a variable the same name ‘overshadows’ it. This will cause problems later if you want to use the class function.
  2 Kommentare
Mohd Shahrukh
Mohd Shahrukh am 26 Mär. 2018
Thnkuu so much
Star Strider
Star Strider am 26 Mär. 2018
As always, my pleasure.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (1)

Walter Roberson
Walter Roberson am 21 Mär. 2018
When you assign [] to an entire variable, it assigns a double precision value that is 0 rows by 0 columns -- the empty double precision array.
When you assign [] to an indexed variable, such as feat(3,:) = [], then the meaning is quite different: it means to delete the indicated portion of the variable.

Kategorien

Mehr zu Loops and Conditional Statements 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