Al momento, stai seguendo questo canale
- Vedrai gli aggiornamenti nel tuofeed di contenuti.
- Potresti ricevere delle e-mail a seconda delle tue preferenze di notifica.
Al momento, stai seguendo questo argomento
- Vedrai gli aggiornamenti nel tuofeed dei contenuti
- Potresti ricevere delle e-mail a seconda delle tue preferenze di notifica.
Sondaggio
Which of the following does not return the correct length (5) of v = [6,2,9,7,3]?
Desideri eliminare questa replica definitivamente?
Questo non può essere annullato.
Desideri eliminare questa replica definitivamente?
Questo non può essere annullato.
Desideri eliminare questa replica definitivamente?
Questo non può essere annullato.
![](https://www.mathworks.com/matlabcentral/discussions/uploaded_files/31446/image.jpeg)
Desideri eliminare questa replica definitivamente?
Questo non può essere annullato.
Desideri eliminare questa replica definitivamente?
Questo non può essere annullato.
- numel(v): Returns the number of elements in the array v. In this case, it correctly returns 5.
- length(v): Returns the number of elements along the longest dimension of the array v. Since v is a vector, length(v) correctly returns 5.
- width(v): There is no built-in function named width in MATLAB. Therefore, this option is incorrect.
- nnz(v): Returns the number of non-zero elements in the array v. Since all elements in v are non-zero, nnz(v) correctly returns 5.
- size(v, 1): Returns the size of the array v along the specified dimension. Since v is a row vector, size(v, 1) correctly returns 1.
- sum(v > 0): Returns the sum of elements in the logical array resulting from the condition v > 0. Since all elements in v are greater than 0, sum(v > 0) correctly returns 5.
Desideri eliminare questa replica definitivamente?
Questo non può essere annullato.
Desideri eliminare questa replica definitivamente?
Questo non può essere annullato.
Desideri eliminare questa replica definitivamente?
Questo non può essere annullato.
Desideri eliminare questa replica definitivamente?
Questo non può essere annullato.
Desideri eliminare questa replica definitivamente?
Questo non può essere annullato.
- For versions earlier than R2013b: The width() function was not introduced until R2013b, so attempting to use it in earlier versions would result in an error. In this case, the code would fail to execute, and no result would be returned.
- For versions between R2013b and R2020b: While the width() function was introduced in R2013b, it did not operate on numeric arrays until R2020b. Therefore, in versions between R2013b and R2020b, using width() on numeric arrays would result in an error or unexpected behavior. The code may execute, but the result may not be accurate or consistent with the expected behavior.
Desideri eliminare questa replica definitivamente?
Questo non può essere annullato.
Desideri eliminare questa replica definitivamente?
Questo non può essere annullato.
Desideri eliminare questa replica definitivamente?
Questo non può essere annullato.
Desideri eliminare questa replica definitivamente?
Questo non può essere annullato.
Desideri eliminare questa replica definitivamente?
Questo non può essere annullato.
Post di questo autore
-
Poll
-
Poll
-
Discussion
-
Discussion
-
Discussion
Tag
Non è stata ancora inserito alcun tag.
Seleziona un sito web
Seleziona un sito web per visualizzare contenuto tradotto dove disponibile e vedere eventi e offerte locali. In base alla tua area geografica, ti consigliamo di selezionare: .
Puoi anche selezionare un sito web dal seguente elenco:
Come ottenere le migliori prestazioni del sito
Per ottenere le migliori prestazioni del sito, seleziona il sito cinese (in cinese o in inglese). I siti MathWorks per gli altri paesi non sono ottimizzati per essere visitati dalla tua area geografica.
Americhe
- América Latina (Español)
- Canada (English)
- United States (English)
Europa
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom(English)
Asia-Pacifico
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)