Community Profile

photo

Bruno Luong


Last seen: Today
1.310 total contributions since 2009

Bruno Luong's Badges

  • Personal Best Downloads Level 4
  • Editor's Pick
  • First Review
  • 5-Star Galaxy Level 5
  • First Submission
  • Revival Level 1
  • Thankful Level 2
  • Guiding Light
  • 6 Month Streak
  • Knowledgeable Level 4
  • First Answer
  • Speed Demon
  • Solver

View details...

Contributions in
View by

Answered
Is there a faster way to run my code?
For binary arrays r=rand(50,8)>0.5; C=rand(60,8)>0.5; [dmin, index_hard] = min(sum(xor(r,permute(C,[3 2 1])),2),[],3); ind...

circa 5 ore ago | 0

Answered
Diagonal slices of 3D array
[I,J] = ndgrid(1:N); D1 = zeros(2*N,N); D1(sub2ind(size(D1),I,J)) = C(sub2ind(size(C),I,J,J)); D2 = zeros(2*N,N); D2(sub...

1 giorno ago | 0

Answered
Is there any MATLAB toolbox that can find the local MAX of a piece-wise multi-variable function?
fmincon and friends if you have the toolbox.

2 giorni ago | 0

Answered
How to perform logical AND on intervals of contiguous locations
x = logical([0, 1, 0,0, 1,1, 0,0,0, 1,1,1, 0]) y = logical([0, 1, 1,0, 1,1, 0,1,0, 1,0,1, 0]) code without loop or groupping, ...

3 giorni ago | 0

| accepted

Answered
performing a least squares with regularisation in matlab
Simpless method: n = size(X,2); % 8 lambda = 1e-6; % <= regularization parameter, 0 no regularization, larger value stronger r...

4 giorni ago | 0

Answered
Generate random sequence number with condition
P=interp1([0 0.9 1],[0.1 2 3.5],'pchip','pp'); n = 1e6; % 200 in your case % here is the array of random r=ppval(P,rand(1,n))...

4 giorni ago | 0

| accepted

Answered
Is there a faster way to run my code?
Use knnsearch if you have the right toolbox (I don't so the code is untested) [index_hard, dist_hard] = knnsearch(C,r,'K',1,'Di...

4 giorni ago | 0

Answered
Can someone provide me the theory and math behind this function of eigen?
for each column number j, A*V = B*V*D implies A*xj = lambdaj*B*xj where xj = V(:,j) lambdaj = D(j,j) This is just a gene...

4 giorni ago | 0

| accepted

Answered
Is there any method to accelerate many small matrix and vector's "mldivide" (4*4)?
Use my FEX file of MultiSolver num = 4000000; A = rand(4,4,num); b = rand(4,num); x = zeros(4,num); tic for i=1:num ...

4 giorni ago | 0

Answered
How do I swap the elements in the major diagonal with those in the minor diagonal?
x=[1 2 3 4 5 6 7 8 9 1 2 3 4 5 6 7 8 9 1 2] s=size(x); m=min(s); n=s(2); i=1:m; id=sub2ind(s,i,i); iad=sub2ind(s,i,n+...

5 giorni ago | 1

Answered
Efficiently calculating sum-thresholds across vector
This works regardless the sign of sample % Test data samples = 5*rand(1,10000); samples = samples+0.5*randn(size(samples)); %...

5 giorni ago | 0

Answered
Find min and max of consecutive values in an array and save these values in a nx2 matrix
v = [670; 671; 672; 680; 681; 682; 700; 701; 702; 703] idx = find([true; diff(v(:))~=1; true]); minmaxseq = [v(idx(1:end-1))...

5 giorni ago | 2

| accepted

Answered
Isolate first non-zero integer of each element of an array
A = [0.00663270674527115 36798861787.4757 0.0165559157141383 0.00845305563147772 0.000298646998074807 2561194549424.91]...

5 giorni ago | 1

| accepted

Answered
how to create a matrix from another
x([2 4], end)

7 giorni ago | 0

Answered
abcd is efghijk?
function C= circulant(x) n=length(x); C=zeros(n,n); C(:,1)=x; for j=2:n C(:,j)=[C(n,j-1); C(1:n-1,j-1)]; end

8 giorni ago | 0

| accepted

Answered
abcd is efghijk?
function C= circulant(x) n = length(x); C = x(mod((1:n)'-(1:n),n)+1);

8 giorni ago | 0

Question


Memory leak with OPENGL hardware
Context: I have a matlab code that output a complex 3D graphic animation on GUI figure, involving patch, lines, markers, camera ...

8 giorni ago | 0 answers | 0

0

answers

Answered
Obtain all integer partitions for a given integer
I wrote a short function that doesn't need to post-proceesed with UNIQUE (wast of time and memory) when using with NSUMK or allv...

8 giorni ago | 0

Answered
abcd is efghijk?
function C= circulant(x) toeplitz(x,circshift(flip(x),1)) end

9 giorni ago | 0

Answered
Set all elements of a sparse matrix to zero
B(:) = 0; C(:) = 0;

9 giorni ago | 0

| accepted

Answered
Is it posiible to hide a source code?
pcode myfun

9 giorni ago | 1

| accepted

Answered
Set of sequnce number
>> A = [1,2,3,4,5,6,7,8] A = 1 2 3 4 5 6 7 8 >> polyval(A,10) ans = 12345678...

9 giorni ago | 0

Answered
Histcounts including values beyond bin edges
Append -Inf/+Inf in your finite edges

10 giorni ago | 1

| accepted

Answered
Meaning of less/greater than in handle objects
I believe the graphic handle object at one point of MATLAB history (before R2014b?) is just a double numbers unique assigned too...

10 giorni ago | 0

| accepted

Answered
How can I access the last values of a list using end?
list(end-3)

12 giorni ago | 1

| accepted

Answered
Matrix having one row
Avoid using LENGTH Replace with for i = 1:size(x,1) ... end

12 giorni ago | 0

| accepted

Answered
Memory cost of multiplying sparse matrices
I guess MATLAB creates a temporary buffer of length equals to the number of rows of A when A*B is invoked. The exact detail only...

12 giorni ago | 0

Answered
How can I pseudorandomize with constrains and make spesific number spread equally among the array?
Unzip this attached file, you'll get a pfile r1234.p Call it A = r1234 You'll get the result as specified.

13 giorni ago | 0

| accepted

Answered
Replacing several values in multidimensional array simultaneously
A(:,:,1) = [1 2 3 ; 4 5 6]; A(:,:,2) = [7 8 9 ; 10 11 12]; s = size(A); A(:, sub2ind(s(2:3),[2 3],[1 2])) = 0 % = [0 0; 0...

13 giorni ago | 0

| accepted

Load more