Community Profile # Bruno Luong

Last seen: Today Active since 2009

#### Statistics

All
• • • • • • • • • • • • #### Content Feed

View by

How can I find negative factorial ? (-0.5)!
There are actually different ways of extending factorial function, see here http://www.luschny.de/math/factorial/hadamard/Hadam...

alrededor de 1 hora ago | 0

install standalone application on macOs, that was compiled on windows
" According to Matlab, I think it should be possible (https://de.mathworks.com/help/compiler/install-deployed-application.html) ...

alrededor de 2 horas ago | 0

Remove all rows of an array based on a value in a column, and also remove all rows that have the same values as this row in other columns
M = [ 15.88 18.43 15.88 18.43 0 15.88 18.43 33.48 14.99 ...

alrededor de 9 horas ago | 0

| accepted

why is acumarray much slower calculating means than sum?
The default behavior of accumarray is sum and it's low-level coded. When you pass user-defined function MATLAB will call the fu...

alrededor de 10 horas ago | 2

| accepted

Question

reduction variables and evaluation order
This the doc on can read "A reduction variable accumulates a value that depends on all the iterations together, but is independ...

1 día ago | 1 answer | 1

### 1

[PR1Data.filename] = deal(''); or if you PR1Data is non empty PR1Data(1).filename = '';

1 día ago | 1

Faster way to create a matrix of the unique() of each row of a matrix
% Test example A=randi(4,10,5) [m,n] = size(A); As=sort(A,2); b=[true(m,1),diff(As,1,2)>0]; R=repmat((1:m)',1,n); C=cums...

2 días ago | 1

| accepted

How to create 3D matrix with empty cells
cell(3,3,3) % replace 3 with 300 for you I'm still afraid you'll be soon in trouble if you ask such question about easy data cr...

2 días ago | 0

| accepted

Fit coefficients are equal (to starting points) in 3000 different fits
Can you do check whereas they are identical with this command after the loop isequal(Coefficients(:,10),Coefficients(:,2999)) ...

2 días ago | 0

How to find the intersection of multiple arrays (or rows of a matrix) in a short code
Put in the cell then use comma list systax: c = {a, b, c, ...}; % or use mat2cell, num2cell depends how you store your 172 vect...

2 días ago | 1

| accepted

2D Interpolation of data
You have scattered data, you should use scatteredInterpolant or similar, not interp2.

2 días ago | 0

| accepted

Do this when loading, Container = load('Saving.mat'); Saving = Container.Saving; Check out doc of save ans struct so you won...

2 días ago | 1

| accepted

scatteredInterpolant function is providing too much noise in interpolation
The problem raises from the fact that scatteredInterpolant use Delaunay triangulation, meaning that X and Y are assumed to have ...

3 días ago | 1

| accepted

Without resorting to FEX/MEX, can the overhead of repeated calls to sparse() be avoided with operations on I, J, V directly?
EDIT: Here is the final code. Method used in B2 is the fatest; M = 10000; N = 10000; N_k = 100; A_k = cell(1,N_k); for k=1:...

3 días ago | 0

| accepted

Does intlinprog use cuts during its Branch and Bound Algorithm?
The document CutMaxIterations: Number of passes through all cut generation methods before entering the branch-and-bound phase,...

3 días ago | 0

| accepted

Vectorized way to assign columns/rows of matrix to struct array's field
split = num2cell(matrixToAssign,1); [structArray.field] = deal(split{;});

3 días ago | 0

What is the best smoothing procedure to calculate differentials for a large number of data points (x,y)?
The Savitzky-Golay filter (moving polynomial fit) is a good filter that preserves decendly the slope. There is a similar thread...

3 días ago | 2

Dot indexing is not supported for variables of this type??? Parfor loop, and global variable
The global variable is not accessible by the workers, and it will return EMPTY when you are trying tp access to it. Soo if you a...

4 días ago | 0

sum of different columns to the desired value in Matlab
A=randi([4 30],10,1); lo = [1 1 1 1]; up = [10 10 5 5]; BCDE=lo+diff(round((cumsum([0, (up-lo)],2)).*(A-sum(lo))./sum(up-lo...

4 días ago | 1

| accepted

sum of different columns to the desired value in Matlab
If you have the optimization toolbox A=randi([4 30],10,1); n = length(A); lo = [1 1 1 1]; up = [10 10 5 5]; m = length(up...

5 días ago | 1

How to ask matlab to find mean only if there are less than 3 NaN values?
qq = [1 2 3 NaN; 1 NaN NaN NaN]; qqm = mean(qq','omitnan'); qqm(sum(isnan(qq),2)>=2) = NaN; qqm

5 días ago | 0

| accepted

Backslash does not provided the solution with the smallest 2-norm
Few other methods to get least-norm solution A = rand(3,6) b = rand(3,1) % Methode 1, Christine, recommended x = lsqminnor...

5 días ago | 1

Speeding up lsqlin to find the base of a matrix
Can you try this: A = mu-eye(size(A)); [Q,R,p] = qr(A,'vector'); n = [R(1:end-1,1:end-1)\R(1:end-1,end); -1]; n(p) = n/sum(n...

5 días ago | 1

| accepted

Trying to parallel compute a function
"or maybe MATLAB automatically does this and my function is already running in parallel?" No. But if you vectorize your funct...

6 días ago | 0

AUC or trapz for irregular shape that intersects itself
I use data you provided on other thread (the excel is horrible to read, if you could provide the data in mat file format it's be...

6 días ago | 0

| accepted

Each PARFOR Worker Writes to the Same File
May be (I didn't test) you could write in binary file at a deterministic place: fileID = fopen('Results.bin','wb'); parfor ......

6 días ago | 0

| accepted

How do i insert one value from one array to another array
See if s is what you want or not (not clear for me) A = [1,2;2,1;1,1;1,3;3,2] B = [0.5,0.5;2,2] k = dsearchn(B,A) AA = ...

7 días ago | 0

| accepted

how to create a list of random number with a minimum difference between each number?
d=3; n = 6; m = 30; p = 100; % each row of x is a random realization x = zeros(p,n); for k=1:p [s,i] = sort(randper...

7 días ago | 0

| accepted