Frage


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

etwa 10 Jahre vor | 2 Antworten | 0

2

Antworten

Frage


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

etwa 10 Jahre vor | 1 Antwort | 0

1

Antwort

Frage


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

mehr als 10 Jahre vor | 2 Antworten | 2

2

Antworten

Frage


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(:,...

mehr als 10 Jahre vor | 1 Antwort | 0

1

Antwort

Frage


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

mehr als 10 Jahre vor | 0 Antworten | 1

0

Antworten

Frage


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

mehr als 10 Jahre vor | 3 Antworten | 1

3

Antworten

Frage


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

mehr als 10 Jahre vor | 1 Antwort | 0

1

Antwort

Frage


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

mehr als 10 Jahre vor | 2 Antworten | 0

2

Antworten

Frage


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

mehr als 10 Jahre vor | 1 Antwort | 0

1

Antwort

Frage


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

mehr als 10 Jahre vor | 2 Antworten | 0

2

Antworten

Frage


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

mehr als 10 Jahre vor | 1 Antwort | 0

1

Antwort

Frage


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

mehr als 10 Jahre vor | 1 Antwort | 0

1

Antwort

Frage


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

mehr als 10 Jahre vor | 1 Antwort | 0

1

Antwort

Frage


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

mehr als 10 Jahre vor | 2 Antworten | 0

2

Antworten

Frage


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

fast 11 Jahre vor | 1 Antwort | 0

1

Antwort

Frage


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

fast 11 Jahre vor | 1 Antwort | 0

1

Antwort

Frage


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

fast 11 Jahre vor | 1 Antwort | 0

1

Antwort

Frage


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

fast 11 Jahre vor | 1 Antwort | 0

1

Antwort

Frage


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

fast 11 Jahre vor | 0 Antworten | 0

0

Antworten

Frage


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

fast 11 Jahre vor | 1 Antwort | 0

1

Antwort

Frage


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

fast 11 Jahre vor | 0 Antworten | 0

0

Antworten