Community Profile

photo

Mnr


Last seen: etwa ein Jahr vor Aktiv seit 2014

Statistiken

  • Thankful Level 4

Abzeichen anzeigen

Content Feed

Anzeigen nach

Frage


a problem with unique command
Hello all, I have an mx1 vector A, that is ordered in an ascending manner. I would like to find unique elements of this vecto...

fast 8 Jahre vor | 1 Antwort | 0

1

Antwort

Frage


a question on inner loops
Hello all, I would like to have 2 for loops such that the outer 1 counts i=1:M and the inner one from j=1:M but j~=i. How can...

etwa 8 Jahre vor | 1 Antwort | 0

1

Antwort

Frage


random generation of a matrix subject to a certain constraint
Hello there, Is there a way to randomly generate a mx1 matrix A, such that transpose(A)*B*A>=1? where B is an mxm matrix? ...

etwa 8 Jahre vor | 1 Antwort | 0

1

Antwort

Frage


Is there a function that performs similar to 'accumarry' but multiplies instead of accumulates?
Hello all, Is there a function that performs similar to 'accumarry' but multiplies instead of accumulates? Thank you!

etwa 8 Jahre vor | 1 Antwort | 0

1

Antwort

Frage


repeating elements of a vector in a certain manner
Hello all, I have a vector A of length n. I would like to create a new vector B which contains each element of A repeated m tim...

etwa 8 Jahre vor | 2 Antworten | 0

2

Antworten

Frage


How to generate all d combinations of elements of a vector of length M?
Hello all, I have a vector of H length M; I would like to create a new matrix V with size dx(M^d), where each column of V con...

etwa 8 Jahre vor | 1 Antwort | 0

1

Antwort

Frage


Fastest way to multiply each block of an array with another matrix
Hello all, I have a 12x4xN array which I would like to multiply each 12x4 block by a 4x16 matrix in order to get a 12x16xN ar...

mehr als 8 Jahre vor | 2 Antworten | 0

2

Antworten

Frage


multiplying 2 matrices with difference sizes
Hello all, I have a 12x16 matrix, M, [ 0 0 1 0 0 0 0 -1 0 1 0 0 -1 ...

mehr als 8 Jahre vor | 1 Antwort | 0

1

Antwort

Frage


how to generate 2^16 different combinations of a vector containing 0 and 1 only?
Hello all, I would like to generate 2^16 different combinations of 16 bits containing 0s and 1s. I have tried different ways ...

mehr als 8 Jahre vor | 1 Antwort | 0

1

Antwort

Frage


replacing a for loop
Hello all, I have a simple piece of code that I would like to get rid of the for loop. I would appreciate your help. ...

mehr als 8 Jahre vor | 1 Antwort | 0

1

Antwort

Frage


multiplying each non zero element of a sparse matrix by a certain number
Hello all, I have a sparse matrix S with few non-zero elements in its row and columns. I have a vector P with the same number...

mehr als 8 Jahre vor | 3 Antworten | 0

3

Antworten

Frage


finding the row number of a matrix
Hello there, I have two matrices one A with size MxN and the other one B with size KxN, and rows of B are taken from rows of ...

mehr als 8 Jahre vor | 1 Antwort | 0

1

Antwort

Frage


How to get rid of a loop?
Hello all, Is there is way of getting rid of the following loop in order to speed up the code? for mk=1:Mk V(:,mk,:)=...

mehr als 8 Jahre vor | 0 Antworten | 0

0

Antworten

Frage


concatenating the several matrices in a certain manner
Hello all, I have N J matrices all with the same size. I would like to concatenate them in a way such that I would get a new ...

mehr als 8 Jahre vor | 1 Antwort | 0

1

Antwort

Frage


multiplying a 1xM vector by a KxN matrix
Hello there, I have a 1xM vector, say V=[1 -1]; I would like to multiply it by a KxN matrix, say S=[0 0 1 1;1 1 0 0;1 0 1 0;...

mehr als 8 Jahre vor | 1 Antwort | 0

1

Antwort

Frage


how to generalize a nested for-loop?2
Hello all, Per my earlier question in http://www.mathworks.com/matlabcentral/answers/252008-a-simpler-way-of-doing-a-nested-l...

mehr als 8 Jahre vor | 2 Antworten | 0

2

Antworten

Frage


how to generalize a nested for-loop?
Hello all, Per my earlier question in http://www.mathworks.com/matlabcentral/answers/252008-a-simpler-way-of-doing-a-nested...

mehr als 8 Jahre vor | 1 Antwort | 0

1

Antwort

Frage


a simpler way of doing a nested loop
Hello, Is there a more efficient alternative way that does the same function as: V=[1+1i +1-1i -1+1i -1-1i]; for m1=1...

mehr als 8 Jahre vor | 2 Antworten | 0

2

Antworten

Frage


concatenating elements of an array in a certain manner
Hello all, I have a matrix b, with the dimension of NxLxNm. I would like to first consider b(:,:,1) up to b(:,:,j-1) where j ...

mehr als 8 Jahre vor | 2 Antworten | 0

2

Antworten

Frage


A fast way of reshaping a cell array with elements with different sizes
Hello all, I have a cell array in this form: a=[1x16x16 double] [1x8x16 double] [1x4x16 double] [1x2x16 double]...

fast 9 Jahre vor | 2 Antworten | 0

2

Antworten

Frage


a question about the for loop index
Hello, I would like to have a for loop with its index k ranging from e.g. 8 to 1 such that in the first iteration k=8, in the...

fast 9 Jahre vor | 1 Antwort | 0

1

Antwort

Frage


a basic question in matlab
Hello all, If I have a 1xLxN matrix and would like to reshape it in order to get a LxN matrix, how I can do that? In particul...

fast 9 Jahre vor | 1 Antwort | 0

1

Antwort

Frage


how to find the largest power of 2 that a number is divisible?
Hello all, How can I write a code that finds the largest integer power of 2 that a number is divisible? For instance, the lar...

fast 9 Jahre vor | 3 Antworten | 0

3

Antworten

Frage


how to write an if statement for a matrix with some NaN elements?
Hello all, I have a matrix with some elements 0s or 1s and the rest are NaNs. I would like to write an if statement that igno...

fast 9 Jahre vor | 1 Antwort | 0

1

Antwort

Frage


how to find the nearest smallest power of 2 to an integer?
Hello all, I would like to write a code that finds the nearest smallest power of 2 to integers. For instance, if my integer ...

fast 9 Jahre vor | 1 Antwort | 0

1

Antwort

Frage


counting the number of non-zero or zero elements in a specific direction of an array
Hello there, I have an 8x3x5 array, and would like to count its number of zeros and non-zeros across its 3rd dimension. In pa...

fast 9 Jahre vor | 1 Antwort | 0

1

Antwort

Frage


A question about for loop
Hello all, I have a vector p=[.5 .7 .2]; I have a quantity d that is equal to (1-p(1))*(1-p(2))*p(3)+(1-p(1))*p(2)*(1-p(3))+...

mehr als 9 Jahre vor | 1 Antwort | 0

1

Antwort

Frage


how to plot a function that is piece-wise linear?
Hello all, I have the attached function, alphastar, which I would like to plot it versus the gamma variable for a fixed value...

mehr als 9 Jahre vor | 0 Antworten | 0

0

Antworten

Frage


finding the frequency of each row (2)
Hello all, Per my previous question, I have several mx2 matrices with rows from (0,1), (-1,0), (0,1), (0,-1), (1,1), (-1,1), ...

fast 10 Jahre vor | 2 Antworten | 0

2

Antworten

Frage


How to find the frequency of each row with certain coordiante in a matrix?
Hello all, I have an mx2 matrix with its rows (0,1), (-1,0), (0,1), (0,-1), (1,1), (-1,1), (1,-1),(-1,-1); I would like to fi...

fast 10 Jahre vor | 2 Antworten | 1

2

Antworten

Mehr laden