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
How to perform repmat function to repeat rows of a matrix
n = 2; kron(A,ones(n,1))

1 hour ago | 0

Answered
How to perform repmat function to repeat rows of a matrix
n = 2; A(kron(1:end,ones(1,n)),:)

1 hour ago | 0

Answered
How to perform repmat function to repeat rows of a matrix
n = 2; A(ceil((1:n*end)/n),:)

1 hour ago | 0

Answered
How to perform repmat function to repeat rows of a matrix
A=[1,0,0,0,1;2,0,0,0,2;3,0,0,0,3] A(repmat(1:end,2,1),:)

1 hour ago | 0

| accepted

Answered
How to perform repmat function to repeat rows of a matrix
A=[1,0,0,0,1;2,0,0,0,2;3,0,0,0,3] reshape(repmat(reshape(A,1,1,[]),2,1,1),[],size(A,2))

1 hour ago | 0

Answered
parfor and rng(1)
rdn(1) outside the parfor has no effect. from the doc: "For independent streams on the workers, use the default behavior or co...

2 hours ago | 0

Answered
Problems in running for loop on keys on container maps
keySet = {'1,1', '1,2', '1,3'}; %use cell array valueSet = {[2 3], [3 4], [9,6]}; M = containers.Map(keySet,valueSet); for p...

8 hours ago | 0

| accepted

Answered
Parfor loop classification "fix usage of indicated variable" error
LEDdetectThresh=(mean(C_data_ArrayMean(:,:,idx),1))+C_data_ArrayStd(:,:,idx); LEDdurIndx=find(C_data_ArrayMean(:,:,idx)>LEDde...

8 hours ago | 0

Answered
Vectorizing or otherwise accelerating nested loops with large multidimensional arrays
% Generate dummy data B=randi(4,10,3,5); A=rand(10,3,5); meanAmp = nan([max(B,[],'all'),size(A,2),size(A,3),size(A,3)]); f...

19 hours ago | 0

Question


Why TMW does not improve INV?
If TMW thinks the legacy algorithm behind INV applied on full square matrix (base on LU and LDT) is not accurate enough (*), why...

1 day ago | 1 answer | 0

1

answer

Answered
Modify off diagonal elements of Matrix without looping
M = 4; A = rand(M); A(1:size(A,1)+1:end) = 10, % This is how you change the diagonal of A using linear indexing

2 days ago | 0

Answered
Sharing Variables between app and matlab workspace?
Put this statement after you generate your data in the callback mydata = ... assignin('base', 'mydata')

3 days ago | 0

| accepted

Answered
Sum(sum()) with optimization variable
What about this: L = reshape(1:size(x,3),1,1,[]) b = L >= t-pt_rj & L <= t; Constraint2 = sum(sum(b.*x,3),1) <= ones(1,size(...

4 days ago | 0

Answered
Optimization: Reuse calculations from objective function in nonlinear constraints function
You can use this design pattern function preciousvalue = expensivereuse(inputs) persistent lastresult if ~isempty(lastresult)...

4 days ago | 1

Answered
How to compare values in respective columns using "ismember"
use ismember on each column separately for j=1:size(A,2) A(:,j) = ismember(A(:,j),B(:,j)); end

4 days ago | 1

| accepted

Answered
Intersection of two curves
Intersection of to things that are not comparable? why not? just avoid using it to conclude anything that matters. N = [1 2 3 4...

5 days ago | 1

| accepted

Answered
Is it possible to specify the 'order' of a smoothing spline?
See if this can helps you https://www.mathworks.com/matlabcentral/fileexchange/25872-free-knot-spline-approximation

5 days ago | 0

| accepted

Answered
Matlab Extracting X and Y coordinates
See here

5 days ago | 0

Answered
Natural Cubic Spline Interpolation
You made at least 2 mistakes: h is not computes Typo "x" instead of "X" The rest of the algorithm I didn't look at carefully ...

6 days ago | 0

Answered
Finding a propriate function to fit "U" curve
This is the best I come up with using BSFK FEX x=[0.17 0.33 0.83 1.67 2.5 3.33 5]; y=[6.62466 5.58235 4.63169 5.08213 5.4159 5...

7 days ago | 0

Answered
linprog ignores options, why?
Can you run with exitflag and output [x, fval, exitflag, output] = linprog( c, A, b, [], [], [], [], options ) and share them...

7 days ago | 1

| accepted

Answered
Why does MATLAB differentiate between strings and character array data types?
strings is introduced recently and the behavior is not the same than char array, an historic class. So they create a new class t...

7 days ago | 0

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

8 days ago | 1

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

8 days 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 =...

9 days 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...

9 days 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...

9 days 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...

9 days 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...

9 days ago | 0

Load more