Community Profile # Bruno Luong

Last seen: Today Attivo dal 2009

#### Statistiche

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

Visto da

Risposto
How can I log commands being executed by matlab? Like diary() but for all function calls.
Check out profile see if it meets your need.

circa 18 ore fa | 0

Risposto
calculate the normal for a plane passing through more than three points

circa 19 ore fa | 0

Risposto
Changing default encoding of MATLAB
I see someone succeed in older MATLAB by editing the file [matlabroot '\bin\lcdata.xml'] Ref in this thread https://www.math...

1 giorno fa | 0

| accettato

Risposto
Dynamic Assign Field Access in MATLAB Structures
clear s=struct('a',1,'b',2,'c',3) % this is a dirty command that pops the field values to the workspace cellfun(@(f) assignin...

2 giorni fa | 0

Risposto
Skipping iteration on child throwing a warning
Modification of script_Z for k = 1:200 lastwarn('',''); % clean the warning state x = input_postprocessed_1/input_pos...

2 giorni fa | 1

| accettato

Risposto
(Matlab Coder)Domain error. To compute complex results from real x, use 'acosd(complex(x))'
"Obviously, the a,b I gave are equal and the val value should be equal to 1" wrong. Before claming anything, you should first c...

2 giorni fa | 0

| accettato

Risposto
Compute group statistics when the group definition is an OR of values found in several columns of a table
I submit a method without loop. I expected to be faster but to my surprise it is slower than v2. But at least it is scalable. %...

2 giorni fa | 0

| accettato

Risposto
Why I am getting "Matrix is singular to working precision"?
The warning message is there "Matrix is singular to working precision" because your equations are dependent % 2*w+3*x+y-11*z =...

2 giorni fa | 0

Risposto
how to effectively find a starting point for fzero?
The problem is not finding the right starting point, the problem is that your function func implementation returns NaN for large...

2 giorni fa | 0

Risposto
How to estimate 95% probability contour in bivariate kernel density function MATLAB
I'm not sure if there is a standard definition of area of 95 confidence in 2D pdf since it like asking what if the shape of 95% ...

3 giorni fa | 0

Risposto
How to keep the values for particular dimension of a matrix and rest of the dimension will be zeros?
A single line solution A(~(ismember(1:size(A,2),350:400) & ismember((1:size(A,1))',20:35))) = 0

3 giorni fa | 0

Risposto
Finding value in Matrix to corresponding minvalue Position in different Matrix
A=randi(10,5) B=randi(10,5) [Amin,jmin]=min(A,[],2) % Amin is A(sub2ind(size(A),(1:size(A,1))',jmin)) % Bmin = B(sub2ind(si...

3 giorni fa | 0

| accettato

Risposto
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(:,...

3 giorni fa | 0

| accettato

Risposto
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 giorni fa | 0

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

4 giorni fa | 0

| accettato

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

4 giorni fa | 1

| accettato

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

4 giorni fa | 0

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

5 giorni fa | 0

| accettato

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

5 giorni fa | 1

Risposto
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')

5 giorni fa | 1

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

5 giorni fa | 1

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

6 giorni fa | 0

| accettato

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

6 giorni fa | 0

Risposto
Update from MATLAB 2023a to 2023b points to wrong URL link

6 giorni fa | 0

| accettato

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

7 giorni fa | 0

| accettato

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

7 giorni fa | 0

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

8 giorni fa | 0

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

8 giorni fa | 0

| accettato

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

8 giorni fa | 0

| accettato

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

8 giorni fa | 0

| accettato