I want to calculate a vector , with each element defined as follows
, where is the set of N dimensional vector, and is also the set of N dimensional vector, c is a constant. The superscript T is denoted as the transpose operation.
In my matlab code, is stored as a three dimensional matrix G, its dimension is (where ).
is also stored as a three dimensional matrix W, its dimension is (where ). c is a scalar.
I know i can use multiple for loop to calculate this vector Y, but it is too inefficient. Is there any some fast way to calculate it, maybe use three-dimensional matrix calculation method?
g is a matrix, not a scalar? What do you mean by transposing a scalar? I feel that there is still something wrong with the formula you wrote. It is better to go directly to the code...
@Torsten I've always felt that mathematical formulas are far less expressive than program code. Many of the symbolic representations are rudimentary, crude, and ambiguous. Shortness is perhaps its only "advantage" - which is often criticized in program code for sacrificing readability.
Impossibile completare l'azione a causa delle modifiche apportate alla pagina. Ricarica la pagina per vedere lo stato aggiornato.
Translated by
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.