提问


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

10 years 前 | 2 个回答 | 0

2

个回答

提问


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

10 years 前 | 1 个回答 | 0

1

个回答

提问


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

10 years 前 | 2 个回答 | 2

2

个回答

提问


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

10 years 前 | 1 个回答 | 0

1

个回答

提问


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

10 years 前 | 0 个回答 | 1

0

个回答

提问


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

10 years 前 | 3 个回答 | 1

3

个回答

提问


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

10 years 前 | 1 个回答 | 0

1

个回答

提问


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

10 years 前 | 2 个回答 | 0

2

个回答

提问


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

10 years 前 | 1 个回答 | 0

1

个回答

提问


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

10 years 前 | 2 个回答 | 0

2

个回答

提问


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

10 years 前 | 1 个回答 | 0

1

个回答

提问


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

10 years 前 | 1 个回答 | 0

1

个回答

提问


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

10 years 前 | 1 个回答 | 0

1

个回答

提问


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

10 years 前 | 2 个回答 | 0

2

个回答

提问


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

10 years 前 | 1 个回答 | 0

1

个回答

提问


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

10 years 前 | 1 个回答 | 0

1

个回答

提问


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

11 years 前 | 1 个回答 | 0

1

个回答

提问


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

11 years 前 | 1 个回答 | 0

1

个回答

提问


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

11 years 前 | 0 个回答 | 0

0

个回答

提问


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

11 years 前 | 1 个回答 | 0

1

个回答

提问


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

11 years 前 | 0 个回答 | 0

0

个回答