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
generate new coordinates (starting from initial coordinates) that are arranged outwards (by a distance H) and on the same plane
load('trace.mat') mt = mean(trace); dt = trace-mt; [~,~,V]=svd(dt); Q=V(:,[1:2]); t2D = dt*Q; [~,is]=sort(atan2(t2D(:,...

1 hour ago | 0

Answered
What will be a suitable option to circumvent a non-invertible matrix?
When you encount warning message like this, the first thing to ask is not "how do I change linear inversion algorithm?", but "wh...

3 hours ago | 0

Answered
Determine the intersection coordinates between a 3D object and an infinite plane
Mesh your plane then use this https://www.mathworks.com/matlabcentral/fileexchange/49160-fast-mesh-mesh-intersection-using-ray-...

20 hours ago | 0

| accepted

Answered
How to tune matrices to specific output?
Use lsqnonlin (or such) if you have optimization toolbox.

24 hours ago | 1

| accepted

Answered
Converged to an infeasible point
I interpret fmincon message for you : Your system is not really controllable and the solution of the final step is driven by the...

24 hours ago | 0

Answered
I will find an xy dataset satisfying an implicit equation.
f = @(x,y)(x.^2 + y.^2).^3 + (15.*x + 3.3.*y).*(x.^2 + y.^2).^2 + (62.5.*x.^2 + 20.*x.*y - 8.37.*y.^2).*(x.^2 + y.^2) - 17.*x.^3...

1 day ago | 0

| accepted

Answered
Problems with savepath in R2023b
On Windows to fix it you need to change the Security setup of the file pathdef.m Right Click on file, Properties, Tab Security, ...

1 day ago | 1

Answered
generate triangular mesh starting from the external nodes (rx3) of a circle
load V; n=size(V,1); % 360 stlwrite(triangulation([ones(n-2,1) (2:n-1)' (3:n)'],V),'mycircle.stl')

1 day ago | 1

Answered
LU factorization with decreasing elements on the main diagonal of U
Obviously not A=[1 10 9; 5 1 9; 2 8 1] [L,U,P]=lu(A) But you can fix the progression of abs(diag(U)) in any arbitra...

2 days ago | 1

Answered
How to solve out of memory error when constructing sparse matrix
You might try the syntax nz = ... ; < 222263280 S = sparse(i,j,v,m,n,nz); with nz is the estimation of non-zero elements of y...

3 days ago | 0

Answered
ascribe zeros to an array
To pad a vector with zeros you only need to set the last-element of the extended vector to 0 f=rand(1,5) % 1000 in your case ...

3 days ago | 0

Answered
Update from MATLAB 2023a to 2023b points to wrong URL link
Download from the website https://www.mathworks.com/downloads/

3 days ago | 0

| accepted

Answered
Different optimization solutions with weighted objective functions
They are all optimal solution since the number of 1 + number of 3 are 7 in 4 cases. Your objective function (divided by w) are ...

4 days ago | 0

| accepted

Answered
I want to plot a transparent triangle
Semi transparent, set FaceAlpha from 0 (100%transparent) to 1 (opaque) W = 0.5; L = 0.3; Patch = [-0.3, -W/2; -0.3, W/2; L, 0...

4 days ago | 0

Answered
What is a simple way to check if a collection of vectors all have the same number of elements
if any(n(1)~=n) The above will crash if your cell is empty. IMO if any(diff(n)) is a more robust test. Thus you can do the ...

5 days ago | 0

Answered
Optimizing distance calculation between vectors and pixels
This is different function that return the squared of the distance. I simplify the code and use instructions that I think it's ...

5 days ago | 0

| accepted

Answered
Largest portion of largest correlation coefficient
% dummy data x = rand(1,500); x = x + +0.01*randn(size(x)); x = sort(x); y = x.^2+0.01*randn(size(x)); cthreshold = 0.99;...

5 days ago | 0

| accepted

Answered
Create a mesh within a triangle and interpolate within this mesh
coords=[470590,7333138;470642,7333275;470643,7333214]; v=[1 2 3] ; % data values at each vertices of the triangle x=coords(:,1...

5 days ago | 0

| accepted

Answered
Inconsistent Results When Evaluating a Typecast and Reshape Operation in MATLAB
Do NOT enter the value from the screen display of a number format long, u1=typecast(uint8([48 41 161 113]),'uint32'); s1=sing...

5 days ago | 0

Answered
calculate volume from iso-surface coordinates (x,y,z).
Do you have connectivity face of these points coordinates? If you use the command isosurface https://www.mathworks.com/help/mat...

5 days ago | 0

Answered
specifying constraints on a spline function
I enforce the curvature to be negative in the x-interval (350,450) load('data.mat') nknots = 20; knots = linspace(min(xb),m...

6 days ago | 0

Answered
How do I access cell array using names contained in master cell array?
First thing to do is to convert your data to struct or table or whatever suitable for your data. mystruct = struct(); for fc =...

7 days ago | 0

| accepted

Answered
QR factorization of a low rank matrix
Here is the Gram-Schmidt orthoganalisation algo that stops at the given ranks (arbitrary, not necessary 2). Again I don't think...

7 days ago | 0

Answered
QR factorization of a low rank matrix
Just use MATLAB qr. I don't think you have a chance to beat Blas function with standard MATLAB program, even if you know rank <=...

7 days ago | 0

Answered
Return largest number of decimal places in a vector of numbers
Good point from @Image Analyst, but I would add a comment: All finite floating numbers when translated to decimal MUST eventual...

7 days ago | 2

Answered
Moment of Lognormal distribution
https://en.wikipedia.org/wiki/Log-normal_distribution "All moments of the log-normal distribution exist and"

8 days ago | 0

Answered
Return largest number of decimal places in a vector of numbers
Check out the second input of num2str in the doc (in general always read the doc throughly most of the time the answer is right ...

8 days ago | 0

Answered
how can we find the coordinates of more points besides the points automatically generated by Contour in MATLAB?
Not sure if you need more contour (more levels) or denser contour. For the first case check the doc of contourf the level param...

8 days ago | 0

Answered
Alternate search functions to speed up code
The below code takes % Elapsed time is 48.221007 seconds. on my PC. Improvement are: use delaunayTriangulation instead of ...

8 days ago | 0

| accepted

Answered
I want to find the eigenvectors of a matrix corresponding to imaginary eigenvalues.
Use imag function A=rand(5); [V,d]=eig(A,'vector'); iscmplx=imag(d)~=0 d=d(iscmplx) V=V(:,iscmplx) % corresponding eigen ...

8 days ago | 1

| accepted

Load more