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.
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.