Réponse apportée
How can i speed up this large matrix multiplications?
There is also another way to precompute B*C as explained <https://fr.mathworks.com/matlabcentral/answers/416237-how-can-i-improv...

presque 8 ans il y a | 0

| A accepté

Réponse apportée
I have some elliptic curve points as (x y) . How can i extract just y values of all the points ?
p = 123457; a = (0:p-1); y2 = mod(a.^2,p); z = mod(a.^3+537*a+2438,p); [b,i] = ismember(y2,intersect(z,y2)); ...

presque 8 ans il y a | 1

| A accepté

Réponse apportée
How to find all possible routes with a given node matrix?
I found actually 13 paths, more than the 10 you have listed: [6 1 23 9 8 7 4 2 5 11 10 13 12 14 19 18 16 17 25 22 21] ...

presque 8 ans il y a | 2

| A accepté

Réponse apportée
How can I speed up the following code? I am using MATLAB R2018a. Thanks.
Code blindly: PP = reshape(p,[X*Y,T]); % p == 0? EE = reshape(e,[X*Y X*Y]); MM = reshape(M,[X*Y T]); PP = PP + bet...

presque 8 ans il y a | 0

| A accepté

Réponse apportée
How to find area of all possible polygons?
n = 5; % No. of control points array = 1:1:n; p=arrayfun(@(k) num2cell(nchoosek(array,k),2), 3:length(array), 'unif'...

presque 8 ans il y a | 0

| A accepté

Réponse apportée
Newton's method for root finding
Quick look, this looks suspiciously a buggy statement xold=xold;

presque 8 ans il y a | 0

| A accepté

Réponse apportée
how to get summation of column-2 values by comparing column-1 values in matlab
load('att_total_count.mat') [c1,~,J] = unique(data3(:,1)); s2=accumarray(J,data3(:,2)); [c1,s2] plot(c1,s2...

presque 8 ans il y a | 0

Réponse apportée
How to find all the possible permutations in a given array?
x = [1 ; 2 ; 3 ; 4 ; 8 ] p=arrayfun(@(k) num2cell(nchoosek(x,k),2), 3:length(x), 'unif', 0); p=cat(1,p{:}); p=c...

presque 8 ans il y a | 0

| A accepté

Réponse apportée
Replacing for loops for faster computations involving 3D matrix and sampling
What are xSample,... zSample and idx? Not sure you need to translate and filter over and over in the for-loop. It seems awful...

presque 8 ans il y a | 0

Réponse apportée
Updating from 2018a to 2018b
You need to uninstall manually the version that you don't want to keep. Some people like me have many versions installed on t...

presque 8 ans il y a | 1

Réponse apportée
is it possible that answers can be accepted?
I might win 2 points or nothing

presque 8 ans il y a | 0

Réponse apportée
is it possible that answers can be accepted?
Can you accept this one and the previous one?

presque 8 ans il y a | 1

Réponse apportée
is it possible that answers can be accepted?
Can you accept this one and the next one?

presque 8 ans il y a | 0

Réponse apportée
I am trying to plot a 3D figure defined by z>=0:
x = linspace(-2,2,50); y = linspace(-2,2,50); z = linspace(-0.1,2,50); x = reshape(x,[],1,1); y = reshape(y,1,[],...

presque 8 ans il y a | 1

Réponse apportée
Plotting the area defin
almost right, you need to make a & b oriented in 2 different dimensions (here row for a and column for b) a=linspace(0...

presque 8 ans il y a | 0

Réponse apportée
Plotting the area defin
Or perhaps you want this? a=linspace(0,1,100)'; b=linspace(0,1,100)'; rect = [a 0+0*a; 1+0*b b; fli...

presque 8 ans il y a | 0

Réponse apportée
What does 'Mex file (mexw64) cannot find required compilers' mean?
It means you need a C-compiler installed on your computer

presque 8 ans il y a | 0

Réponse apportée
Ensure same random coordinates do not appear twice
You can do by rejection margin = 1.2; n = 1000; xy = []; mxy = 0; while mxy < n m = ceil(margin*n)-mxy; ...

presque 8 ans il y a | 0

Réponse apportée
How to get all the solutions to an underdetermined system of linear equations using lsqnonneg()?
The number of solutions is infinity. Explanation: >> size(a) ans = 5 45 In your case you have ...

presque 8 ans il y a | 4

| A accepté

Réponse apportée
Cubic Splines for Interpolation
% fake data x = sort(rand(1,5)) y = rand(size(x)) xmissing = linspace(0,1,1000); % put here coordinates of pts to...

presque 8 ans il y a | 0

Réponse apportée
How to group double matrix based on the first column values and list second values as observations?
X = [1 2.1 1 2.3 2 1.9 3 4.0 1 2.0] [id,~,j]=unique(X(:,1)); val = accumarray(j,X(:,2),[],...

presque 8 ans il y a | 1

| A accepté

Réponse apportée
Count number of times value occurs
Assume a and b are row vectors, and one of them is not too big c = sum(a(:)==b,1)

presque 8 ans il y a | 0

Réponse apportée
Count number of times value occurs
Method for large _a_ and _b_ [u,~,j] = unique(b(:)); [b, i] = ismember(a(:),u); c = accumarray(i(b),1,size(u)); c ...

presque 8 ans il y a | 3

| A accepté

Réponse apportée
Obtain subscript values of common diagonal rectangle in binary matrix?
% Fake data MM_bin=rand(100)>0.2; check_mat = [0 0 0 0 0 1 1 1 1; 0 0 0 0 1 1 1 1 0; 0...

presque 8 ans il y a | 0

| A accepté

Réponse apportée
Matrix showing all combinations of multiple dice roll
dice_size=[2 3 4]; n = length(dice_size); c = arrayfun(@(n) 1:n, flip(dice_size), 'unif', 0); [c{:}] = ndgrid(c{:...

presque 8 ans il y a | 2

| A accepté

Réponse apportée
How get row index of first and last appearance each unique cell element
Make the output in the "stable" order: x = ["MUY09KT00" "TW00.00" "MUY09KT00" "TW00.00" "MUY09KT00" "TW00.0...

presque 8 ans il y a | 1

| A accepté

Réponse apportée
reduce execution time in matlab
@dpb The comment %#ok<AGROW> tells the author (Kevin Sheppard) is well aware about growing, and he obviously doesn't care. ...

presque 8 ans il y a | 0

Réponse apportée
What is the complexity of ismember function?
"Is there a better function in matlab (with lower complexity) that i can use that assuming the input is sorted" You could do ...

presque 8 ans il y a | 0

Réponse apportée
What is the algorithm used by svds function?
svds is a MATFILE and it calls different methods depending on your inputs. You might step over and see if _matlab.internal.math....

presque 8 ans il y a | 0

| A accepté

Réponse apportée
assimble small victors into bigger one using for loop
a1= [1; -1]; a2= [1 ;-1]; a = {a1 a2}; F = zeros(length(a)+1,1); for i=1:2 F(i+[0,1]) = F(i+[0,1]) + a{i}...

presque 8 ans il y a | 0

Charger plus