Question


why when I use mvrnd to generate random vectors from a multivariate normal I always get small numbers in absolute value ?
Hi, why when I use mvrnd to generate random vectors from a multivariate normal I always get small numbers in absolute value (no...

bijna 11 jaar ago | 1 answer | 0

1

answer

Question


Using ngrid to create a matrix listing all combinations of values from row vectors
Hi, I have the following vectors A= [1 2 3 4]; B= [1 2]; C= [1 2 3 6 7 8]; D= [1 3 6]; and I want to cr...

bijna 11 jaar ago | 2 answers | 0

2

answers

Question


How to compare a vector A of real numbers with a vector of zeros using equalities and inequalities?
Hi, I have a vector A mx1 which should be compared with a mx1 vector of zeros. In particular: for the first n<m elements I want...

bijna 11 jaar ago | 1 answer | 0

1

answer

Question


"Meshgrid" in more than 3 dimensions?
Hi, I have the following vectors A= [1;2;3;4;5;6]; B= [1;2;3;4;5;6]; C= [1;2;3;6;7;8]; D= [-1;0;9;8;2;3;5]; E=...

bijna 11 jaar ago | 2 answers | 1

2

answers

Question


How can I set 32 workers performing parfor?
Hi, I'm using Matlab in the HPC cluster of my department. I know that the HPC has a matlab parallel license for up to 32 wor...

bijna 11 jaar ago | 1 answer | 0

1

answer

Question


How can I sum the rows of a matrix at a fixed distance between each other?
Hi, I have a vector A (m*p)x1 and I want to create a vector B px1 where B(i)=sum_{n=0}^{m-1}A(i+p*n), e.g. m=3; p=4; ...

bijna 11 jaar ago | 2 answers | 1

2

answers

Question


How can I count the occurrences of each element in a column vector and store them in a vector of the same dimension as the original one?
Hi, I have a vector A mx1 and I want to create a vector B mx1 reporting the number of occurrences of each element in A, e.g. i...

bijna 11 jaar ago | 2 answers | 0

2

answers

Question


How to pick the elements in a vector with row coordinates satisfying a criterion determined by another vector?
Hi, I have a column vector A reporting the first m natural numbers, each of them repeated an arbitrary number of times, e.g. ...

ongeveer 11 jaar ago | 2 answers | 0

2

answers

Question


"Kronecker" of varying dimensions?
Hi, I have a matrix A of dimension m x n and a vector b of natural numbers with dimension m x 1. I want to obtain a matrix C of...

ongeveer 11 jaar ago | 1 answer | 0

1

answer

Question


How can I compare two matrices of different dimensions without looping?
Hi, I have two matrices of different dimensions. For example: A=[1 1 1 1; 2 1 1 1; 2 0 0 0; 3 0 1 0; 3 0 0 0; 3 0 0 1; 4 1...

ongeveer 11 jaar ago | 1 answer | 0

1

answer

Question


Why is the execution time changing?
Hi, I have two versions of a code. Both versions are divided into two parts and the two versions differ for the first part, whi...

ongeveer 11 jaar ago | 2 answers | 0

2

answers

Question


problems with parfor and matlabpool: Error using parallel_function at 598
Hi, I'm trying to speed up my code using parfor instead of for but it doesn't work. It gives me the error: ??? Error using ==> ...

ongeveer 11 jaar ago | 2 answers | 0

2

answers

Question


How can I modify this code to use parfor s=1:r?
Hi, I have reported here a very simple piece of code but it basically faces the same issues of my actual estimation code. Could...

ongeveer 11 jaar ago | 1 answer | 0

1

answer

Question


parfor and global variables
Hi, could you help me please in solving this problem? I need to use parfor and at the same time the function simuconf inside par...

ongeveer 11 jaar ago | 2 answers | 0

2

answers

Question


Transform a two dimensional into a three dimensional and combine with another three dimensional array
Hi, I have this matrix A=randn(4,3); and I want to transform it in a three dimensional matrix by stacking that matrix ...

ongeveer 11 jaar ago | 2 answers | 0

2

answers

Question


How can I change this code to be able to use parfor?
A=randn(5,1); parfor i=1:4 B=randn(3,1); for t=1:size(B,1) for w=1:size(A,1) ...

ongeveer 11 jaar ago | 1 answer | 0

1

answer