Frage


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...

fast 11 Jahre vor | 1 Antwort | 0

1

Antwort

Frage


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...

fast 11 Jahre vor | 2 Antworten | 0

2

Antworten

Frage


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...

fast 11 Jahre vor | 1 Antwort | 0

1

Antwort

Frage


"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=...

fast 11 Jahre vor | 2 Antworten | 1

2

Antworten

Frage


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...

fast 11 Jahre vor | 1 Antwort | 0

1

Antwort

Frage


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; ...

fast 11 Jahre vor | 2 Antworten | 1

2

Antworten

Frage


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...

etwa 11 Jahre vor | 2 Antworten | 0

2

Antworten

Frage


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. ...

etwa 11 Jahre vor | 2 Antworten | 0

2

Antworten

Frage


"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...

etwa 11 Jahre vor | 1 Antwort | 0

1

Antwort

Frage


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...

etwa 11 Jahre vor | 1 Antwort | 0

1

Antwort

Frage


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...

etwa 11 Jahre vor | 2 Antworten | 0

2

Antworten

Frage


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 ==> ...

etwa 11 Jahre vor | 2 Antworten | 0

2

Antworten

Frage


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...

etwa 11 Jahre vor | 1 Antwort | 0

1

Antwort

Frage


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...

etwa 11 Jahre vor | 2 Antworten | 0

2

Antworten

Frage


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 ...

etwa 11 Jahre vor | 2 Antworten | 0

2

Antworten

Frage


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) ...

etwa 11 Jahre vor | 1 Antwort | 0

1

Antwort