Feeds
提问
How can I efficiently extract a max along two dimensions, from a 4 dimensional array, without writing a double loop?
I have the following loop. It picks values from a matrix A(nb,nd). For each vaue of this matrix A it constructs a matrix B = F...
12 years 前 | 1 个回答 | 0
1
个回答提问
indexing into a matrix to eliminate a loop
This file generates an ergodic density matrix. I would like to get rid of the inner loop (over ii). The first line in the outer ...
12 years 前 | 2 个回答 | 0
2
个回答提问
How can I avoid a simple loop where matrices are created and then summed?
P is a matrix of size (ny,ny); F0 is a matrix of size (nh,ny); Each row of P multiplies its respective column of F0, creating ...
12 years 前 | 2 个回答 | 0
2
个回答提问
how to allocate elements of a vector into different rows in a matrix, preserving the column order?
Consider Z = zeros(4,2); X = [0.15 , 0.33]; P=[2 3]; I am looking for the simplest form of applying P to X and ...
12 years 前 | 1 个回答 | 0
1
个回答提问
indexing into a matrix
I have a dataset. It is a matrix Z with say, N total observations (rows), and K variables (columns). However, the total N obser...
12 years 前 | 0 个回答 | 0
0
个回答提问
What is the most compact way to update an index vector out of a cube?
I have 3 vectors each with n elements (n individuals). Two of them are exogenous state vectors y and r, both with n elements...
12 years 前 | 1 个回答 | 0
