Pregunta


Count equal values in multiple matrices
I have a number of M by N matrices with random integers between 1 and 5, for example if I have: X1 = [1 2 1 3 5 4 2 4 3; ...

más de 9 años hace | 2 respuestas | 0

2

respuestas

Pregunta


Use numbers in a matrix to call vector row
I have the code prand = rand(100,100); P = 1+round(prand*999); P2 = P(samparray,1); % this part doesn't wor...

más de 9 años hace | 1 respuesta | 0

1

respuesta

Pregunta


Why won't matlab use all logical cores?
I am running a highly vectorized code and have noticed that matlab will not use all of my logical cores. Many vector operations...

alrededor de 10 años hace | 2 respuestas | 2

2

respuestas

Pregunta


Is there a multiplicative accumarray function?
I am using accumarray to additively accumulate numbers with a code like the following: wts = accumarray([P(:,2),P(:,1)],P(:,...

alrededor de 10 años hace | 1 respuesta | 0

1

respuesta

Pregunta


Shrinking subplot in loop
I have noticed that when using subplot in a loop, the figures get linearly smaller with each loop until they have no height. Th...

alrededor de 10 años hace | 0 respuestas | 1

0

respuestas

Pregunta


How to open variables in command line?
Is there a function that can be typed into the command window to open a variable listed in the workspace? I have many hundreds ...

alrededor de 10 años hace | 3 respuestas | 1

3

respuestas

Pregunta


Logical Indexing problem with vector lengths
The following statements result in the 'the number of elements in B and I must be the same' error: P=[1 6 2 2 2 5 9 1 3]' ...

alrededor de 10 años hace | 1 respuesta | 0

1

respuesta

Pregunta


Further simplify a simple vectorized operation
I have a row vector of values 'gridx'. For example: gridx=[0.5 1.0 1.5 2.0 2.5 3.0 3.5 4.0 4.5] I also have a la...

alrededor de 10 años hace | 2 respuestas | 0

2

respuestas

Pregunta


Vectorization fail with sub2ind?
I have the for loop code for m=1:numel(N,1) y = N(m,1); % y matrix index x = N(m,2); % x matrix index d...

alrededor de 10 años hace | 1 respuesta | 0

1

respuesta

Pregunta


Using a vector of indices to add values to a matrix
I am trying to vectorize a piece of code which has this form: for m = 1:1:numel(N) y = N(m,1); x ...

alrededor de 10 años hace | 2 respuestas | 0

2

respuestas

Pregunta


How to use values of a vector as indices for a matrix
I have the 20x20 matrix M and the m-by-3 matrix (two column vectors) L. The values in the 1st and 2nd column of matrix L are ...

alrededor de 10 años hace | 1 respuesta | 0

1

respuesta

Pregunta


logical operation on a column within a matrix
I have the m-by-n matrix POS I want to focus on a single column and perform an element-wise logical operation. For instance,...

alrededor de 10 años hace | 1 respuesta | 0

1

respuesta

Pregunta


pcolor not showing edge of matrix
I am plotting a matrix using the following: figure(1); pcolor(VX); shading flat; colorbar; xlabel('x, km'); ylabel...

alrededor de 10 años hace | 1 respuesta | 0

1

respuesta

Pregunta


Speed and Multiple Vectors
Is it faster to operate on multiple individual vectors or to put many vectors into a single matrix and simply reference the colu...

alrededor de 10 años hace | 2 respuestas | 0

2

respuestas

Pregunta


Finding and using sparse matrix indices
I have the sparse matrix array L= (36,67) 1 (39,70) 1 (42,73) 1 (45,76) 1 (48,79) ...

alrededor de 10 años hace | 1 respuesta | 0

1

respuesta

Pregunta


reference elements in a matrix based on values in a vector
I have the 1x9 vector [5 3 2 6 7 26 4 33 3] I want to obtain the matrix [5 3 2; 6 7 26; 4 33 3] using completely vectorized c...

alrededor de 10 años hace | 1 respuesta | 0

1

respuesta

Pregunta


Matlab slow when running many instances?
Why does matlab become slow to respond when many instances are opening? I have two workstations, one has an overclocked i7 4960...

alrededor de 10 años hace | 1 respuesta | 0

1

respuesta

Pregunta


Vectorize operations referencing adjacent elements of a matrix
I have made the simple code: for i=2:xsize-1 for j=2:ysize-1 for n=2:zsize-1 matrix(i,j,n)...

alrededor de 10 años hace | 1 respuesta | 0

1

respuesta

Pregunta


pcolor plot with non-linear axis
I have the n*m matrix 'HMB'. I plot this with pcolor right now as: subplot(1,1,1); pcolor(HMB); shading flat; ...

alrededor de 10 años hace | 0 respuestas | 0

0

respuestas

Pregunta


parallelizing calculations with nested for loops?
I have the following (simplified) code that I want to parallelize. It is a sort of 'embarrassingly simple' parallelizable task....

alrededor de 10 años hace | 1 respuesta | 0

1

respuesta

Pregunta


Movie playback broken in Windows 8.1?
Only the first frame shows up, it is offset and blurry, matlab remains busy, but nothing else happens. I can close the figure. ...

alrededor de 10 años hace | 0 respuestas | 0

0

respuestas