Community Profile

photo

Chaoyang Jiang


Last seen: etwa 2 Jahre vor Aktiv seit 2018

Statistiken

  • Thankful Level 3

Abzeichen anzeigen

Content Feed

Anzeigen nach

Frage


Matlab2020b version error - readonly Brace indexing is not supported for variables of this type
Hi there, I am using the 2020b matlab version. Each time, as long as I open a vairable in workspace, I get the error saying: re...

mehr als 2 Jahre vor | 1 Antwort | 0

1

Antwort

Frage


Is there a faster way of updating elements in a big matrix?
Is there a faster way of updating elements in a big matrix? Currently, I have A with a size of 9000000*8760. Each loop I need...

mehr als 5 Jahre vor | 0 Antworten | 0

0

Antworten

Frage


How to randomly generate one non-zero element of each row from a matrix
How to randomly generate one non-zero element of each row from a matrix and then create a new matrix? For A=[1 5 6 7 0; ...

mehr als 5 Jahre vor | 2 Antworten | 0

2

Antworten

Frage


most time-consuming lines are self-time
I did the profile of the code, and it seems the most time-consuming lines are self-time (as attached). At this case, may I know ...

mehr als 5 Jahre vor | 0 Antworten | 0

0

Antworten

Frage


why facecolor 'Flat' in bar and area is different and how to make them the same
I am using area and bar to plot a figure. I have used the color 'Flat' both for the two. However, the two legend colors are no...

mehr als 5 Jahre vor | 1 Antwort | 0

1

Antwort

Frage


find the index of non-zero elements of three dimensional matrix and rank the them according to the value
For a three dimentional matrix: A=randi(10,[10 10 5]), I want to find the index (x,y,z) of each non-zero element of A and then r...

mehr als 5 Jahre vor | 1 Antwort | 0

1

Antwort

Frage


replace the 2nd and 3rd elements without the use of find
a=[2 3 4 1 3]; b=[1 1 0 1 0]; c=[2 3]; how to replace the 2nd and 3rd elements (c) in a(b) by 3 without the use of fi...

mehr als 5 Jahre vor | 1 Antwort | 0

1

Antwort

Frage


How to plot three y-axes in one figure, where each one y-axis have three lines to be plotted?
How to plot 3 y-axes in one figure, where each one y-axis have 3 lines to be plotted? Something like Fig below for which I have ...

fast 6 Jahre vor | 1 Antwort | 1

1

Antwort

Frage


logical matrix divided by double matrix is slow
a=logical(12,90,111); b=randi(100,[12,90,111]); c = a ./ (b+1e-10). This line seems a very simple operation but it is...

fast 6 Jahre vor | 2 Antworten | 1

2

Antworten

Frage


How to use parfor to delete the first c elements of each cell of b?
How to use parfor to delete the first c elements of cell b? Error: The variable b in a parfor cannot be classified. b=ce...

fast 6 Jahre vor | 1 Antwort | 0

1

Antwort

Frage


How to close the small blue window appeared in the command window
Does anyone experience this, where a small blue window appears in the command window and cannot be closed? <</matlabcentr...

fast 6 Jahre vor | 2 Antworten | 0

2

Antworten

Frage


How to resign each non-zero column elements of a matrix according to a vector
How to resign each non-zero column elements of a maxtrix a according to the vector b1. E.g., for a(:,1), non-zero elements is [2...

fast 6 Jahre vor | 1 Antwort | 0

1

Antwort

Frage


delete the first n elements of each cell
Given cell a, how to delete the first n elements of each cell? I am now using for loop. However, when the loop is big (5021889 l...

fast 6 Jahre vor | 1 Antwort | 0

1

Antwort

Frage


generate random numbers among each non zero column elements
Given a=[0 1 1; 1 1 1; 1 0 1], the row index of first elements of 1st colomn is [2 3], 2nd colomn is [1 2] and 3rd colomn is [1 ...

fast 6 Jahre vor | 0 Antworten | 0

0

Antworten

Frage


How to read data from a matrix according to the lower and upper index range
Given one logical matrix a, b defines the lower and upper index range of each row of a to be 1. May I know how to vectorize the ...

fast 6 Jahre vor | 1 Antwort | 0

1

Antwort

Frage


find the minimal value of a vector
I wanna find the minimal value of column b with logical c of vector a. When b is super big , max operation takes a very long tim...

fast 6 Jahre vor | 1 Antwort | 0

1

Antwort

Frage


If gpu computing or convert to mex file help to accelerate the code
Attached is the profiling results of my code, where the most time-consuming lines are those from build-in functions(e.g., find, ...

fast 6 Jahre vor | 1 Antwort | 0

1

Antwort

Frage


Is there a faster version of min
I did the profiling, and this line takes the most of time: running 28449740 times and takes 163.84s. I am wonderring if there...

fast 6 Jahre vor | 0 Antworten | 2

0

Antworten

Frage


How to speed up find and unique
I did the profiling where unique and find take the most of time. I use find as I want to know the row and column index of the...

fast 6 Jahre vor | 0 Antworten | 0

0

Antworten

Frage


speed up max function
How to speed up max function? The following line [a,b] = max(c(1:24,1,2,3)) takes 2685.49s for calling 541390285 times. Is there...

fast 6 Jahre vor | 1 Antwort | 0

1

Antwort

Frage


speed up the & operation
How to speed up the following code? I did profiling, and this line takes 3267.72s for calling 245913489 times. a=[1 0 1 1 ...

fast 6 Jahre vor | 0 Antworten | 0

0

Antworten

Frage


replace the b-th row and >30-th column of a by a-30
I want to replace the b-th row and >30-th column of a by a-30. How to make the following code more efficient within one line? ...

fast 6 Jahre vor | 1 Antwort | 0

1

Antwort

Frage


How to deal with the matrix with the size of 5000000*8760
How to deal with the matrix with the size of 5000000*8760? 5000000 here is the vehicle number and 8760 represent the hourly char...

fast 6 Jahre vor | 1 Antwort | 0

1

Antwort

Frage


how to read the data from vector
a=randi(10000,[10000,1]); b=randi(10000,[10000,1]); c=randi(100,[10000,10000]); My question is how to find th...

fast 6 Jahre vor | 1 Antwort | 0

1

Antwort

Frage


speed up line: find(c>a(:,1) & c<= a(:,2))
How can I speed up this line: a=[3 4; 5 6; 4 5;2 8; 1 9; 23 24;1 12;3 6;12 25; 15 30;...] b=find(5>a(:,1) & 5<= a(:,2));...

fast 6 Jahre vor | 0 Antworten | 0

0

Antworten