回答済み
How to modify an array's elements using another element?
Fix code: function bonusScores = CombineScores(numberScores, userScores) for i = 1:numberScores-1 userScores(i) =...

8年弱 前 | 3

| 採用済み

回答済み
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...

8年弱 前 | 1

| 採用済み

回答済み
add non zeros in array to my probability formular
ep = 1 - prod(1-a,2)

8年弱 前 | 1

| 採用済み

回答済み
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...

8年弱 前 | 0

| 採用済み

回答済み
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 ...

8年弱 前 | 0

回答済み
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)]; ...

8年弱 前 | 0

回答済み
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...

8年弱 前 | 0

回答済み
How do I find an efficient way to create a matrix from an array
A = 1:100; B = (0:100)' + A

8年弱 前 | 0

回答済み
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...

8年弱 前 | 0

| 採用済み

回答済み
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; ...

8年弱 前 | 0

| 採用済み

回答済み
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 ...

8年弱 前 | 0

回答済み
Convert Adjacency list of graph into Adjacency matrix
use SPARSE or ACCUMARRAY

8年弱 前 | 0

回答済み
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.*...

8年弱 前 | 0

| 採用済み

回答済み
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...

8年弱 前 | 0

| 採用済み

回答済み
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...

8年弱 前 | 0

回答済み
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...

8年弱 前 | 0

| 採用済み

回答済み
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 = [...

8年弱 前 | 0

| 採用済み

回答済み
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...

8年弱 前 | 1

回答済み
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...

8年弱 前 | 1

回答済み
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...

8年弱 前 | 1

回答済み
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 ...

8年弱 前 | 0

回答済み
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(:),...

8年弱 前 | 1

| 採用済み

回答済み
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,...

8年弱 前 | 0

回答済み
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

8年弱 前 | 0

| 採用済み

回答済み
How do I avoid errors due to round-off in Matlab?
t=linspace(0,tend,Nt);

8年弱 前 | 1

| 採用済み

回答済み
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...

8年弱 前 | 0

回答済み
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...

8年弱 前 | 0

回答済み
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(:)]; ...

8年弱 前 | 1

回答済み
frequency of a range of data from a matrix
use histcounts2

8年弱 前 | 0

さらに読み込む