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 interpolate a set of data with the cubic method?
I would do this of you look for x corresponds to y = 600 x = [74 29 21 12 8 5.7 4.4 3.6 2.1 1.8 1.5 1.0 0.7]; y = [80 131 189 ...

ungefär 4 timmar ago | 0

Answered
How can I call a value in side the a function which is already evaluated.
If you want to retrieve value of a variable from the parent workspace inside a function without passing it as argument onstead o...

2 dagar ago | 0

| accepted

Answered
Matlab R2022b installation is not working
Probably the best way is to contact support https://servicerequest.mathworks.com/mysr/cp_case_new1?cc=uk

5 dagar ago | 0

Answered
Free-knot spline approximation (BSFK) problem
Reference to BSFK function https://fr.mathworks.com/matlabcentral/answers/1810010-free-knot-spline-approximation-bsfk-problem H...

6 dagar ago | 0

| accepted

Answered
Bug in audioread with native option R2022b?
I has been confirmed by TMW support that is indeed a bug due to third party library they are using.

7 dagar ago | 0

| accepted

Answered
Normal random number generation
Here is an alternatve without stats tbx https://uk.mathworks.com/matlabcentral/fileexchange/23832-truncated-gaussian?s_tid=srch...

7 dagar ago | 0

Answered
Comparing large sparse matrices for differences close to machine precision
One way to compare matrices is to display norm(A-B, Inf) / norm(A, Inf) It should be at machine precision (~1e-15) of at worst...

8 dagar ago | 0

Question


Bug in audioread with native option R2022b?
The audioread command with 'native' option should return the native type of the waveform. It seems there is a bug in R2022b, wh...

8 dagar ago | 1 answer | 0

1

answer

Answered
How does the mod function compensate for floating point round off?
Second version, correction under stricter condition than in the first version function r = rmod2(x, a) k = round(x/a); r = x ...

9 dagar ago | 0

Answered
How does the mod function compensate for floating point round off?
I try to replicate MATLAB mod ith this function, it seems working well for 2 examples, no warranty beside that. x=(rand(1,1e6)-...

9 dagar ago | 1

Answered
Vectorization: incompatible sizes of arrays
Simpler one liner O(:,2) = P(randi(end,n_o,end),2) + repelem(P(:,2),n_o) / 2;

10 dagar ago | 1

Answered
How to set the parent of the subplot in a neat way?
ax = subplot(1,2,2,'Parent',fig1)

10 dagar ago | 1

| accepted

Answered
Vectorization: incompatible sizes of arrays
O(:,2) = reshape(reshape(P(randi(end,n_o,end),2),n_o,[]) + reshape(P(:,2),1,[]), [],1) / 2;

11 dagar ago | 0

Answered
Can a Dictionary Key be a char?
The syntax that needs to be used is d = dictionary(char.empty(0,0,0), [])

11 dagar ago | 0

Answered
Simplest way to create a unit vector in Matlab?
if by "unit" vector you means vector where the elements are all 1s len = 9; V = ones(1,len)

11 dagar ago | 0

| accepted

Answered
Can a Dictionary Key be a char?
It looks to me that dictionary can accept both char array and string indisrtinctively as keys, as it convert to string internall...

12 dagar ago | 0

Answered
Generating a combination matrix within a certain condition
I hope it works. My output is transposed, meaning the number of columns of comb is number of sets. The maxsum is upper bound of...

13 dagar ago | 2

| accepted

Answered
How to get the same number of char as number of decimals using num2str?
input = pi str = num2str(input,16)

13 dagar ago | 0

| accepted

Answered
Is there faster ranking for matrices than double sort()?
Not sure it is faster, but on the theorical complexity it is better (single sort). A = randi(10,5,3) [~,I] = sort(A,1); [m,...

13 dagar ago | 1

| accepted

Answered
How to enable contour plot for 3D trisurf?
https://uk.mathworks.com/matlabcentral/fileexchange/38858-contour-plot-for-scattered-data

13 dagar ago | 0

Answered
Is there a Faster alternative to containers.Map function ?
In new release R2022b the dictionary is new implementation of hashing search/insertion. It looks great.

13 dagar ago | 0

Answered
Elementwise shift of two matrices
truncated matrices [~, idx_A] = min(A); [~, idx_B] = min(B); di=idx_A-idx_B; Ac=A(max(1,1+di):min(end,end+di)) Bc=B(max(1-d...

14 dagar ago | 0

| accepted

Answered
How to generate repeatable random multiple vectors with Specific Number of Values and Fixed Sum?
Just split randomly at most m times on top of randfixedsum output m=5; nvalues=3; starget=10; n=diff([0 sort(randperm(m-1,...

14 dagar ago | 1

Answered
Polyfit polynomial badly conditioned on Linux whereas on Mac no warnings
In R2022a the Vandermonde matrix V is built the condition number is aroun 1e12, and the resolution is carrired out by [p, rankV...

15 dagar ago | 2

| accepted

Answered
How to do a Fourier analysis with a mask?
Discrete Fourier transform always has unwanted artefact on finite region, due to boundary wrapping jumps, even for rectangular r...

15 dagar ago | 0

Answered
Simultaneous sortrows() for all slices of a 3D matrix?
Code applicable for n == 2 and N < 256 only: % Parameters: N = 20; n = 40; m = 2; d = 200000; % Generate an example matrix...

15 dagar ago | 1

| accepted

Answered
Simultaneous sortrows() for all slices of a 3D matrix?
Somewhat faster % Parameters: N = 20; n = 40; m = 2; d = 200000; % Generate an example matrix 'A': A = randi(N,n,m,d,'u...

16 dagar ago | 1

Answered
For loop over function handle, how to speed up the code?
If your handle A can accept a matrix as input and the calculation of A(B) is not bottleneck, you can work by chunk % N = 2^16; ...

16 dagar ago | 0

Answered
Why tic/toc reports slower times the first five iterations?
If I remember, the JIT optimizer decides to kick in when the same code is detected by execution engine to run few times (5).

16 dagar ago | 1

Answered
MATLAB CODE FOR ROOT MEAN SQUARED
To my book the mean should not be removed in calculation of RMS M = rand(3,100); [rows, columns] = size(M); cal_rms = zeros(r...

16 dagar ago | 0

Load more