Chaoyang Jiang
Followers: 0 Following: 0
Feeds
提问
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...
3 years 前 | 1 个回答 | 0
1
个回答提问
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...
6 years 前 | 0 个回答 | 0
0
个回答提问
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; ...
6 years 前 | 2 个回答 | 0
2
个回答提问
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 ...
6 years 前 | 0 个回答 | 0
0
个回答提问
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...
6 years 前 | 1 个回答 | 0
1
个回答提问
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...
6 years 前 | 1 个回答 | 0
1
个回答提问
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...
6 years 前 | 1 个回答 | 0
1
个回答提问
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 ...
6 years 前 | 1 个回答 | 1
1
个回答提问
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...
6 years 前 | 2 个回答 | 1
2
个回答提问
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...
6 years 前 | 1 个回答 | 0
1
个回答提问
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...
6 years 前 | 2 个回答 | 0
2
个回答提问
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...
6 years 前 | 1 个回答 | 0
1
个回答提问
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...
6 years 前 | 1 个回答 | 0
1
个回答提问
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 ...
6 years 前 | 0 个回答 | 0
0
个回答提问
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 ...
6 years 前 | 1 个回答 | 0
1
个回答提问
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...
6 years 前 | 1 个回答 | 0
1
个回答提问
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, ...
6 years 前 | 1 个回答 | 0
1
个回答提问
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...
6 years 前 | 0 个回答 | 2
0
个回答提问
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...
6 years 前 | 0 个回答 | 0
0
个回答提问
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...
6 years 前 | 1 个回答 | 0
1
个回答提问
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 ...
6 years 前 | 0 个回答 | 0
0
个回答提问
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? ...
6 years 前 | 1 个回答 | 0
1
个回答提问
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...
6 years 前 | 1 个回答 | 0
1
个回答提问
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...
6 years 前 | 1 个回答 | 0
1
个回答提问
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));...
6 years 前 | 0 个回答 | 0