Réponse apportée
How to modify an array's elements using another element?
Fix code: function bonusScores = CombineScores(numberScores, userScores) for i = 1:numberScores-1 userScores(i) =...

presque 8 ans il y a | 3

| A accepté

Réponse apportée
Sampling some elements without replacement out of big population, based on a probability distribution
*Your question is mathematically inconsistent*. Take a very simple example, a population of 2: [1,2], and you want to generate 1...

presque 8 ans il y a | 1

| A accepté

Réponse apportée
add non zeros in array to my probability formular
ep = 1 - prod(1-a,2)

presque 8 ans il y a | 1

| A accepté

Réponse apportée
how to store data in cell array
faceData = cell(40,5); % or cell(5,40) for i=1:40 for j=1:5 % ... read v w = uint8(v); faceDat...

presque 8 ans il y a | 0

| A accepté

Réponse apportée
Why 'for loop' is very slow even working on server
As I mention in <https://fr.mathworks.com/matlabcentral/answers/424724-why-is-the-function-isinterior-filling-up-memory another ...

presque 8 ans il y a | 0

Réponse apportée
I cannot figure out how to solve this. I NEED HELP!
Declare some useful anonymous functions (only the last one will be use) n60 = @(t) [t(1)+floor(t(2)/60), mod(t(2),60)]; ...

presque 8 ans il y a | 0

Réponse apportée
accessing all elements along the diagonals and rows (simple backprojection algorithm for image reconstruction)
OK, here is the conv method as proposed by IA and started by Guillaume, it works for rectangular input array as well. Some convo...

presque 8 ans il y a | 0

Réponse apportée
How do I find an efficient way to create a matrix from an array
A = 1:100; B = (0:100)' + A

presque 8 ans il y a | 0

Réponse apportée
Hi. I need to know how can I generate an array of random integers in a given range where every integer in the range should appear at least once in the array ?
n=4; p=10; a = randi(n,[1 p]); a(randperm(p,n)) = 1:n

presque 8 ans il y a | 1

| A accepté

Réponse apportée
Why is the function isinterior filling up memory?
Alternative? Easy just go back to INPOLYGON or even better: my <https://fr.mathworks.com/matlabcentral/fileexchange/27840-2d-pol...

presque 8 ans il y a | 0

| A accepté

Réponse apportée
find element in array
Not sure how you get the result, but here is an attempt Data E=[1 2;1 5;2 3;2 4;2 5;3 4;4 5;4 7;4 9;5 6;6 11;6 12;6 13; ...

presque 8 ans il y a | 0

| A accepté

Réponse apportée
find a same element inside a cell
C = {[1,2,5],[2,3,4],[1,2,4,5],[4,7,9],... [1,2,4,5,6,9,10,11],[6,12,13],[1,2,4,5,6,9,13,14]}; % uncomment this line ...

presque 8 ans il y a | 0

Réponse apportée
Convert Adjacency list of graph into Adjacency matrix
use SPARSE or ACCUMARRAY

presque 8 ans il y a | 0

Réponse apportée
3D Best Fit Line
% Fake n-points in R3, n=4 in your case n = 10; a = randn(3,1); b = randn(3,1); t = rand(1,10); xyz = a + b.*...

presque 8 ans il y a | 0

| A accepté

Réponse apportée
Splitting a matrix into group based into the first column and select the maximum value from the second column for each interval
AB = [... 0.468490416082415 -68.0623566640544 0.861091227948802 -62.0460361812610 0.920662009016715 -52.2025156248263...

presque 8 ans il y a | 0

| A accepté

Réponse apportée
Replacing For loop with Conv2 In edge detection to make it run faster
_"I'm supposed to use im2col in the code and the whole purpose is to avoid a loop and make it run faster. And I'm not allowed to...

presque 8 ans il y a | 0

Réponse apportée
Interpolating function with monotonic decresing first derivative
You can use PCHIP, either in the toolbox or as option of INTERP1 for shape-preserving interpolation. For fitting you might ta...

presque 8 ans il y a | 0

| A accepté

Réponse apportée
How to obtain all the solutions of quadratic equations with multiple variables?
I have impression the 4 equations are not independent, and that might confuse MATLAB. For any 2x2 rotation matrix R = [...

presque 8 ans il y a | 0

| A accepté

Réponse apportée
FiltFilt function initial and final conditions
Now a rigorous approach of zero-phase FIR on circular data. One need to build a circular matrix from the coefficients A and B, t...

presque 8 ans il y a | 1

Réponse apportée
Repeat values in a vector
Another method: [~,loc] = histc(a2,a1); b2 = b1(loc) yet another one b2 = b1(interp1(a1,1:length(a1),a2,'previou...

presque 8 ans il y a | 1

Réponse apportée
FiltFilt function initial and final conditions
Here is a demo of using filtfilt on periodic data * The first method use filtfilt on one period * The second method stitches...

presque 8 ans il y a | 1

Réponse apportée
Counting up starting from first row of zeros in a matrix, then 1's.
These methods perform just like the subject suggests: counting (rather than sorting) *Method 3:* a=m'; z=a==0; nz ...

presque 8 ans il y a | 0

Réponse apportée
Correspondance matrix for matching values in two vectors
That gives the second form of your expected result, but assuming elements are 1,2,..., n n = 3; c = accumarray([a(:),...

presque 8 ans il y a | 1

| A accepté

Réponse apportée
How to apply elliptic curve point multiplication using matlab code or command ?
Take a step back and see what tools you have under the hand. If you want to multiply the point P in EC by a integer number n,...

presque 8 ans il y a | 0

Réponse apportée
why the output of this calculation over 300 is wrong?
100<x<=300 Is not what you think, replace it with 100<x && x<=300

presque 8 ans il y a | 0

| A accepté

Réponse apportée
How do I avoid errors due to round-off in Matlab?
t=linspace(0,tend,Nt);

presque 8 ans il y a | 1

| A accepté

Réponse apportée
Creating a new string matrix
I will pad appropriate number of ascii-0 characters to the tail of the shorter strings to make them a matrix. >> char({'abc...

presque 8 ans il y a | 0

Réponse apportée
Copy the curve in the Axes of a Figure to the Axes of a GUI
% Fake plot axesrc = axes('Parent',figure(1)); plot(axesrc,sin(linspace(0,4*pi))); axedest = axes('Parent',figure...

presque 8 ans il y a | 0

Réponse apportée
Finding lower convex hull in 3D
You can select the lower part by calculate the z-component of the normal [X,Y,Z] = sphere(50); XYZ = [X(:) Y(:) Z(:)]; ...

presque 8 ans il y a | 1

Réponse apportée
frequency of a range of data from a matrix
use histcounts2

presque 8 ans il y a | 0

Charger plus