Community Profile

photo

Bruno Luong


Last seen: Today Active since 2009

Statistics

All
  • 24 Month Streak
  • Thankful Level 4
  • Speed Demon
  • Solver
  • GitHub Submissions Level 1
  • Personal Best Downloads Level 4
  • Ace
  • Editor's Pick
  • First Review
  • 5-Star Galaxy Level 5
  • First Submission
  • Revival Level 1

View badges

Content Feed

Answered
Supplying gradient for the subset of parameters
May be you could provide the gradient interface for all, but compute the subset derivative analytically and the complement by fi...

ongeveer 14 uur ago | 0

Answered
Matrix algebra AxB=C, I want to solve for B
You can't recover the "original" B, whatever it is, your system is underdetermined (much more unknowns - 1826 - than equations -...

ongeveer 22 uur ago | 1

Answered
How can I assign zeros to a particular value in an expression
test function test N =4; u = (1:N); v = (N:2*N-2); function ui = getu(i) if i <= 0 | i >= 4 ui = 0; else ui =...

1 dag ago | 0

| accepted

Answered
How to find x value for a known y in array plot?
* x = linspace(-3,3); Assuming your data are monotonic on the neighborhood of the max y = exp(-x.^2); [maxy, imax] = max(y...

1 dag ago | 0

Answered
pause() function is inaccurate
The accuracy is documented. "The accuracy of the pause function is subject to the scheduling resolution of your operating syste...

1 dag ago | 1

Answered
Question about the fminsearch Algorithm
fminsearch is an mfile, you can copy it then mofify these lines #196 (R2022a) % Set up a simplex near the initial guess. % PUT...

1 dag ago | 0

Answered
How to reduce the usage of "broadcast variables" when using parfor
You can use parallel constant to convert el, el_row1, ds, vmin to constant and reduce the data transfert, if they are not modifi...

1 dag ago | 0

Answered
Concatenate arrays of different length inside loop
What's wrong with cell? vox_count_cell = cell(1, length(image_files)); for i = 1:length(image_files) header = spm_vol(ima...

2 dagen ago | 0

Answered
How do I implement multistart with lsqnonlin in my code?
"it returns the initial value" It indicates that the fit fails, not problem of wrong stating points (converge to local minima)....

2 dagen ago | 0

Answered
solve equation numerically 1=(1/y)x*exp(x*y)
Numercial solution y = 0.01:0.01:1; x = nan(size(y)); for k=1:length(y) yk = y(k); x(k) = fzero(@(x)x.*exp(x.*yk)-y...

2 dagen ago | 0

Answered
How to interpolate missing z-values: looking for ideas
You might try this inpaint_nans FEX by John d'Errico

2 dagen ago | 0

Answered
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...

2 dagen ago | 1

Answered
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) ...

3 dagen ago | 0

Answered
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 ...

3 dagen ago | 0

| accepted

Answered
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...

3 dagen 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...

3 dagen ago | 1 answer | 1

1

answer

Answered
Adding fields to a struct?
[PR1Data.filename] = deal(''); or if you PR1Data is non empty PR1Data(1).filename = '';

4 dagen ago | 1

| accepted

Answered
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...

4 dagen ago | 1

| accepted

Answered
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...

5 dagen ago | 0

| accepted

Answered
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)) ...

5 dagen ago | 0

| accepted

Answered
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...

5 dagen ago | 1

| accepted

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

5 dagen ago | 0

| accepted

Answered
Load an array instead of a struct with fields
Do this when loading, Container = load('Saving.mat'); Saving = Container.Saving; Check out doc of save ans struct so you won...

5 dagen ago | 1

| accepted

Answered
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 ...

5 dagen ago | 1

| accepted

Answered
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:...

5 dagen ago | 0

| accepted

Answered
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,...

6 dagen ago | 0

| accepted

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

6 dagen ago | 0

Answered
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...

6 dagen ago | 2

Answered
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...

7 dagen ago | 0

Answered
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...

7 dagen ago | 1

| accepted

Load more