Question

What is MCR R2022b Update 5 ?

When I try to download MCR 2022b, it appears the Update is 5 https://ssd.mathworks.com/supportfiles/downloads/R2022b/Release/5/...

1 month ago | 2 answers | 0

Answered

R2022B Update4 is not offered

The online update for R2022b Update 4 is NOT offered by TMW. Workaround : do the offline installation. Risk: you need to unin...

R2022B Update4 is not offered

The online update for R2022b Update 4 is NOT offered by TMW. Workaround : do the offline installation. Risk: you need to unin...

1 month ago | 0

| accepted

Answered

Are there any matrix balancing/scaling function in matab for complex rectagular matrices?

Check out normalize

Are there any matrix balancing/scaling function in matab for complex rectagular matrices?

Check out normalize

1 month ago | 0

Question

R2022B Update4 is not offered

Is it just me or the update 4 is not offered via the menu Help => Check for Updates I'm using Update 3

1 month ago | 5 answers | 0

Answered

Finding the length of the longest continuous streak of a same number for each row of a matrix

p = 3; q = 10; r = 2; A = sort(randi(10,p,q,r,'uint16'),2) B = reshape(permute(A,[2 1 3]),q,[]); t = true(1,width(B)); [...

Finding the length of the longest continuous streak of a same number for each row of a matrix

p = 3; q = 10; r = 2; A = sort(randi(10,p,q,r,'uint16'),2) B = reshape(permute(A,[2 1 3]),q,[]); t = true(1,width(B)); [...

1 month ago | 1

| accepted

Answered

Is this a mistake in documentation or my misunderstanding of FFT?

"Single sided Amplitude spectrum from Double sided spectrum it is only the DC component to be excluded from multiplying by 2" N...

Is this a mistake in documentation or my misunderstanding of FFT?

"Single sided Amplitude spectrum from Double sided spectrum it is only the DC component to be excluded from multiplying by 2" N...

1 month ago | 0

| accepted

Answered

How to encrypt compilation files for standalone?

The MATLAB source files are already encrypted (with you compile with MATLAB compiler, MCC)

How to encrypt compilation files for standalone?

The MATLAB source files are already encrypted (with you compile with MATLAB compiler, MCC)

2 months ago | 1

Answered

movavg with custom type and weights

movavg requires first array is a column vector or matrix A = 1:5; B = [0.5 0.5]; movavg(A(:), "custom", B) % or reshape back...

movavg with custom type and weights

movavg requires first array is a column vector or matrix A = 1:5; B = [0.5 0.5]; movavg(A(:), "custom", B) % or reshape back...

2 months ago | 2

Answered

Effect of zero padding on FFT amplitude

If your (windowed) signal dies out to 0 in a smooth way then the padding with 0s on the tail changes little to the FFT spectrum ...

Effect of zero padding on FFT amplitude

If your (windowed) signal dies out to 0 in a smooth way then the padding with 0s on the tail changes little to the FFT spectrum ...

2 months ago | 3

Answered

how can I write this in a compact form? can anyone suggest a single line code for it

n = 8; ismember(mod((1:n)-(1:n)',n),[1 n-1])

how can I write this in a compact form? can anyone suggest a single line code for it

n = 8; ismember(mod((1:n)-(1:n)',n),[1 n-1])

2 months ago | 1

Answered

Hi. How I can write this formula with Matlab code?

n=10; psi=rand(1,n-2); chi = 0; for k=1:n-2 i = nchoosek(1:n-2,k); j = 1:k; l = k+1-j; il = i(:,l); ...

Hi. How I can write this formula with Matlab code?

n=10; psi=rand(1,n-2); chi = 0; for k=1:n-2 i = nchoosek(1:n-2,k); j = 1:k; l = k+1-j; il = i(:,l); ...

2 months ago | 0

Answered

How to calculate the entropy of a portion of image as in the following formula?

Please try this A=imread('ngc6543a.jpg');; A=double(A(1:500,:,:)); A=sum(A,3); M = 11; N = 11; % Build 8-neighbor [di,...

How to calculate the entropy of a portion of image as in the following formula?

Please try this A=imread('ngc6543a.jpg');; A=double(A(1:500,:,:)); A=sum(A,3); M = 11; N = 11; % Build 8-neighbor [di,...

2 months ago | 0

| accepted

Answered

How to generate random number from Bernoulli distribution?

p = 0.25 X = double(rand(1,1000) < p) histogram(X,'Normalization','pdf')

How to generate random number from Bernoulli distribution?

p = 0.25 X = double(rand(1,1000) < p) histogram(X,'Normalization','pdf')

2 months ago | 0

| accepted

Answered

Interp1 is not woking

Extrapolation is notoriously unstable. So there is no surprise here. v1r = -0.01:0.00001:0 f1r = interp1(v1, f1, v1r, 'spline'...

Interp1 is not woking

Extrapolation is notoriously unstable. So there is no surprise here. v1r = -0.01:0.00001:0 f1r = interp1(v1, f1, v1r, 'spline'...

2 months ago | 0

Answered

all integer possibilities for equations

@Ravindra Pawar Replace eqt 2 to eqt 1 to remove one variable, you can solve it with gcd or more generally see this oldthread h...

all integer possibilities for equations

@Ravindra Pawar Replace eqt 2 to eqt 1 to remove one variable, you can solve it with gcd or more generally see this oldthread h...

2 months ago | 1

Answered

how to remove noise from curves and take their derivates

I would chose spline fitting rather than polynomial (bad) or rational. Look at the shape of your data, I doubt any simple analy...

how to remove noise from curves and take their derivates

I would chose spline fitting rather than polynomial (bad) or rational. Look at the shape of your data, I doubt any simple analy...

2 months ago | 0

| accepted

Answered

How to convert matrices of different sizes in a for loop into a single column vector?

... PhaseC = cell(1, nLevels); for k = 1:nLevels ... Phase = acos(subband./amp); PhaseC{k} = Phase(:); end Ph...

How to convert matrices of different sizes in a for loop into a single column vector?

... PhaseC = cell(1, nLevels); for k = 1:nLevels ... Phase = acos(subband./amp); PhaseC{k} = Phase(:); end Ph...

2 months ago | 0

Answered

How to sort minimum value from a matrix

See matchpairs function number = 6; A = 1+10*(rand(number,2)); B = [4,8; 6,8; 8,8; 6,6.7; 6,5.4; 6,4.1]; % Calculate all dis...

How to sort minimum value from a matrix

See matchpairs function number = 6; A = 1+10*(rand(number,2)); B = [4,8; 6,8; 8,8; 6,6.7; 6,5.4; 6,4.1]; % Calculate all dis...

2 months ago | 1

| accepted

Answered

Faster alternative to polyxpoly

I would add my own BLU_polyxpoly which derived from here https://fr.mathworks.com/matlabcentral/fileexchange/27673-2d-polygon-ed...

Faster alternative to polyxpoly

I would add my own BLU_polyxpoly which derived from here https://fr.mathworks.com/matlabcentral/fileexchange/27673-2d-polygon-ed...

2 months ago | 0

Answered

Where is the code of a Matlab Object?

which comm.LinearEqualizer If it's mfile contains source code then you can see it.

Where is the code of a Matlab Object?

which comm.LinearEqualizer If it's mfile contains source code then you can see it.

2 months ago | 1

Answered

How can I find the filter bandwidth of Savitzky-Golay filtering?

sa-golay filter is just non-causal FIR filter, where the coefficients are computed as following order=3;framelength=11; B = sg...

How can I find the filter bandwidth of Savitzky-Golay filtering?

sa-golay filter is just non-causal FIR filter, where the coefficients are computed as following order=3;framelength=11; B = sg...

2 months ago | 1

| accepted

Answered

Multiplication of matrix and first dimension of a 3-D array without for loops

A = rand(4,4); B = rand(4,10,5); % orginal code for i = 1:10 for j = 1:5 C(:,i,j) = A(:,:)*B(:,i,j); end en...

Multiplication of matrix and first dimension of a 3-D array without for loops

A = rand(4,4); B = rand(4,10,5); % orginal code for i = 1:10 for j = 1:5 C(:,i,j) = A(:,:)*B(:,i,j); end en...

2 months ago | 1

Answered

How to represent [airfoil] coordinates as a polynomial

You could use the free-knot spline xy = [0 0 0.00369000000000000 0.0134500000000000 0.0170200000000000 0.028070000000...

How to represent [airfoil] coordinates as a polynomial

You could use the free-knot spline xy = [0 0 0.00369000000000000 0.0134500000000000 0.0170200000000000 0.028070000000...

2 months ago | 0

Answered

Set unintentionally triggers uitable callback

I use uistyle to change the background, AFAIK it doesn't trigger callback unlike set()

Set unintentionally triggers uitable callback

I use uistyle to change the background, AFAIK it doesn't trigger callback unlike set()

2 months ago | 0

Answered

How to create all possible matrices of zeros and ones without having more than one '1' in the same column?

m = 2; n = 3; c = cell(1,n); [c{:}] = ndgrid(1:m); i = reshape(cat(n+1,c{:}),[],n); [j,k] = meshgrid(1:n,1:size(i,1)); X...

How to create all possible matrices of zeros and ones without having more than one '1' in the same column?

m = 2; n = 3; c = cell(1,n); [c{:}] = ndgrid(1:m); i = reshape(cat(n+1,c{:}),[],n); [j,k] = meshgrid(1:n,1:size(i,1)); X...

2 months ago | 1

| accepted

Answered

How to generate code in MATLAB for randomly oriented short fibers?

See if this FEX can help you

How to generate code in MATLAB for randomly oriented short fibers?

See if this FEX can help you

2 months ago | 0

Answered

How to simplify the for loop for 3D matrix?

load('A.mat'); load('s1.mat'); load('s2.mat'); [m,n,p] = size(s1); % s = [reshape(s1, [m,1,n,p]), reshape(s2, [m,1,n,p]...

How to simplify the for loop for 3D matrix?

load('A.mat'); load('s1.mat'); load('s2.mat'); [m,n,p] = size(s1); % s = [reshape(s1, [m,1,n,p]), reshape(s2, [m,1,n,p]...

2 months ago | 0

| accepted

Answered

is Matlab code a lot faster than Excel formulas?

Impossible to answer with such fuzzy question; the time depends on your hardware, your matlab version, your licences to acess to...

is Matlab code a lot faster than Excel formulas?

Impossible to answer with such fuzzy question; the time depends on your hardware, your matlab version, your licences to acess to...

2 months ago | 1

Answered

generate two variable from distribution without same result

Warranty never repeated pairs lA = 0; uA = 5; % lower upper bound of A lB = -4; uB = 4; % and B n = 50; % ...

generate two variable from distribution without same result

Warranty never repeated pairs lA = 0; uA = 5; % lower upper bound of A lB = -4; uB = 4; % and B n = 50; % ...

2 months ago | 0

Answered

How to adjust a curve fit such that it goes through a specific point

Add blue point as additional data point and associate it a strong weight to the rest (see Weights of options)

How to adjust a curve fit such that it goes through a specific point

Add blue point as additional data point and associate it a strong weight to the rest (see Weights of options)

3 months ago | 0