Community Profile

photo

Bruno Luong


Last seen: Today Con actividad desde 2009

Estadísticas

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

Ver insignias

Content Feed

Respondida
Where is dlfeval tracing information stored?
I don't kwow the dlarray class but IMO it looks like the creating function handle f is stored in some sort of private property i...

5 días hace | 0

Pregunta


Default rank revealing tolerance
In few MATLAB functions such as RANK, PINV, ORTH there is a parameter TOL. MATLAB uses the default value as % tol = max(size(A...

5 días hace | 0 respuestas | 1

0

respuestas

Respondida
plot() and fplot() give different results for the same function
Your coding is wrong: Replace "/" with "./"

6 días hace | 0

| aceptada

Respondida
getting warning while using eigs on the matrices obtained from freefem++
Try to follow the suggestion you get " Consider specifying a perturbed numeric sigma value to improve the condition of the matri...

8 días hace | 0

Respondida
cubic spline interpolation - mixed boundary conditions possible?
In principle yes. The spline on the second segment (b,c) are piecewise cubic poynomials; starting from b sequentially to each in...

9 días hace | 0

| aceptada

Respondida
How to convert /map uint16 to int16 maintaining the dynamic range so that [0] and [2^16-1] in uint16 beomes [-2^15] and [2^15-1] without going through double
If you have C compiler this simple mex file will do the job: /*****************************************************************...

18 días hace | 1

Respondida
Faster/better conversion than using swapbytes typecast on udp byte datastream?
Try this: %% Exampel data data =[0 5 187 8 1 136 61 48 0 0 0 0 1 67 58 246 255 127 176 76 10 231 55 137 255 240 253 91 255 22...

20 días hace | 0

| aceptada

Respondida
How to add extra columns at specified locations
After computing dataset2 dataset = [1, 2, 3, nan, 4, 5, nan, 6, 7]; % ... dataset2 = [2, 5, 7, 8, 4, 8, 10]; do this: da...

20 días hace | 0

| aceptada

Respondida
scrit can't error related to Sortrows and matrix
Replace initialization statements sol=[]; % Start with an empty matrix of feasible solutions data = []; with sol=zeros(...

21 días hace | 0

Respondida
Max Recursion even when using clear
Don't name your script function clear.m. In command windows type which clear then rename or remove that file to restore the bu...

21 días hace | 0

Respondida
Upsampling a matrix with zero elements
x = [1 2 3 4; 5 6 7 8] kron(x, [1 0; 0 0])

21 días hace | 1

Respondida
warning in Polyval - Warning: Matrix is singular, close to singular or badly scaled. Results may be inaccurate. RCOND = NaN.
Check your data with this command all(isfinite(rawData(:))) if it returns 0/false then your data is not valid

22 días hace | 0

Respondida
Does linprog support warm-starts?
Not that I'm aware of.

23 días hace | 0

| aceptada

Respondida
How to detect whether a figure is created by uifigure()
This command sreturns true for uifigure handle fig matlab.ui.internal.isUIFigure(fig)

24 días hace | 0

| aceptada

Respondida
Trying to optimise this loop
function WriteOutValuesToAFile(filename,M) fileID = fopen(filename,'wt'); for k=1:size(M,3); s = sprintf('%f,', M(:,:,k))...

25 días hace | 0

Respondida
How to do a layered matrix--vector multiplication without a for loop?
NNN = 10; RR = rand(NNN, 3); TT = rand(3,3,NNN); for iii = 1:1:NNN TRR(iii,:) = TT(:,:,iii) * RR(iii, :).'; % Bug fix ...

26 días hace | 2

| aceptada

Respondida
Convert Quaternion to Euler angle extrinsically
Here is the answer by MATLAB code: extrinsic angles is flip intrinsic angles % Generate random unit quaternion q = quaternion(...

26 días hace | 1

Respondida
Why I receive an error when my code is in function but not when he's in editor ?
You could consider to vectorize the test instead of using for loop and the side effect when deleting array element(s). I don't k...

28 días hace | 0

Respondida
Why I receive an error when my code is in function but not when he's in editor ?
Loop in reverse would fix the issue (cross interaction between deletion that makes array strinks and loop index) for i = si...

28 días hace | 0

| aceptada

Respondida
Seeking Help: Deleting Redundancy in a Structure Array
a(1).pos=[1,7,1]; a(2).pos=[1,7,1]; a(3).pos=[6,5,5]; a(4).pos=[1,4,3]; a(5).pos=[2,2,2]; P = cat(1, a.pos); [~, I] = un...

28 días hace | 0

| aceptada

Respondida
How to generate a random 3D vector with set magnitude?
MagTarget = 10; MagRange = 0.5; n = 1000; m = MagTarget + MagRange * (rand(1,n)-0.5); xyz = randn(3,n); xyz = xyz .* (m ./ ...

29 días hace | 2

Respondida
Interpolation schemes that produce positive second derivatives of the interpolant
You can use approximation spline, just put more (denser) knots than the data points so it actually interpolates. For example us...

29 días hace | 0

| aceptada

Respondida
scatteredInterpolant function gives error in input data if I try to interpolate a vectorial field where for each point I have 2 values, but in the doc it says that is allowed.
I guess you use an old MATLAB version that doesn't support vector interpolation. EDIT the doc is for 2023b more recent than you...

alrededor de 1 mes hace | 2

| aceptada

Pregunta


sum results depending on array orientation
The issue of sum depending to array orientation is reported by @Matt J in this thread To me the flaw is serious enough that it ...

alrededor de 1 mes hace | 2 respuestas | 0

2

respuestas

Respondida
Just by changing values of k, the given code gives error. Why?
k need to be column vector and your transposed is miss placed. The correct is k = -((M/2-1):M/2).';

2 meses hace | 0

| aceptada

Respondida
Quickest way for alternate indexing a vector
Try to do something clever (1st and 2nd methods) but it is slower than your code 53rd method). A small modificationof your code ...

2 meses hace | 1

Respondida
function to generate collections of integers that all sum to the same value?
Look in File Exchange with the keywords integer partition. You'ill find many implementations for example this one: https://www....

2 meses hace | 0

| aceptada

Respondida
Matlab memory optimization regarding output arguments
You better have your funtion codded like this function functie() x = 9; % Remove the braket x = functieLocala(x); ...

2 meses hace | 1

Respondida
Size mismatch (size [1 x :?] ~= size [0 x 1]) - GPU Coder Deployment
Try to initialize index = zeros(1, 0); since you concatenate index horizontally in the for loop.

2 meses hace | 0

Respondida
How can we compute batch matrix-matrix product of matrices (3-D tensors) in MATLAB?
b = 2; n = 3; m = 4; p = 5; A = rand(b,n,m); B = rand(b, m,p); AA = permute(A, [2 3 1]); BB = permute(B, [2 4 1 3]); ...

3 meses hace | 0

| aceptada

Cargar más