Respondida

symmetric solutions of linear matrix equations

If you have tthe optimization toolbox % Generate test matrices n = 3; A = randn(n); X=rand(n); X = X+X.'; B = X*A; % Add s...

symmetric solutions of linear matrix equations

If you have tthe optimization toolbox % Generate test matrices n = 3; A = randn(n); X=rand(n); X = X+X.'; B = X*A; % Add s...

4 meses hace | 0

| aceptada

Respondida

how to multiply every single element in a matrix to entire of another matrix?

x = [100,500,900,1300,1700; 120,600,1080,1560,2040; 140,700,1260,1820,2380; 160,800,1440,2080,2720; 180,900,...

how to multiply every single element in a matrix to entire of another matrix?

x = [100,500,900,1300,1700; 120,600,1080,1560,2040; 140,700,1260,1820,2380; 160,800,1440,2080,2720; 180,900,...

4 meses hace | 1

Respondida

symmetric solutions of linear matrix equations

% Generate test matrices n = 5; A = randn(n); X=rand(n); X = X+X.'; B = A*X; % Add small noise to B B = B + 1e-1*randn(siz...

symmetric solutions of linear matrix equations

% Generate test matrices n = 5; A = randn(n); X=rand(n); X = X+X.'; B = A*X; % Add small noise to B B = B + 1e-1*randn(siz...

4 meses hace | 0

Respondida

polyfit step by step or analytics

polyfit is the mfile you can step through in debugging mode. If you call with one outout argument (non normalized) it build van...

polyfit step by step or analytics

polyfit is the mfile you can step through in debugging mode. If you call with one outout argument (non normalized) it build van...

4 meses hace | 0

Respondida

Inserting 0 in sparse matrices without changing sparsity pattern?

Is it possible to tell MATLAB to not change the sparse matrix, but instead treat inserted zeros as any other value? Short answ...

Inserting 0 in sparse matrices without changing sparsity pattern?

Is it possible to tell MATLAB to not change the sparse matrix, but instead treat inserted zeros as any other value? Short answ...

4 meses hace | 1

| aceptada

Respondida

How to fix my linear fit model?

Assuming you know where to split the data for left and right lines: x = [0 1 2 3 4 5 6 7 8 10 11 12 13 14 15 16 17 18 19 20 ......

How to fix my linear fit model?

Assuming you know where to split the data for left and right lines: x = [0 1 2 3 4 5 6 7 8 10 11 12 13 14 15 16 17 18 19 20 ......

4 meses hace | 1

| aceptada

Respondida

How to fix my linear fit model?

This returns the piecewise linear function that is continuous at the break point. The correct break point is close to 18.6054 a...

How to fix my linear fit model?

This returns the piecewise linear function that is continuous at the break point. The correct break point is close to 18.6054 a...

4 meses hace | 1

Respondida

strcmp gives a 0 while it should be a 1

Look more carefully: There is a 'c' before '49' in A but not in B

strcmp gives a 0 while it should be a 1

Look more carefully: There is a 'c' before '49' in A but not in B

4 meses hace | 0

| aceptada

Respondida

Basic FFT Question: What range to sample the function in.

" However I am under the impression that the fft should not be sensitive to this change. " Your expectation in incorrect When y...

Basic FFT Question: What range to sample the function in.

" However I am under the impression that the fft should not be sensitive to this change. " Your expectation in incorrect When y...

4 meses hace | 0

| aceptada

Respondida

getfield to get values from an entire struct array?

Create 1 x 3 struct array with field named 'afield' s = struct('afield', {11 12 13}) s(1) s(2) s(3) % Here is the command t...

getfield to get values from an entire struct array?

Create 1 x 3 struct array with field named 'afield' s = struct('afield', {11 12 13}) s(1) s(2) s(3) % Here is the command t...

4 meses hace | 0

| aceptada

Respondida

express basis spline derivative in terms of interpolation values

x = [1 2 3 4 5]; y = randn(size(x)); k = 5; f = spapi(k,x,y); B = spapi(k,x,eye(length(x))); fdd = fnder(f, 2); Bdd = ...

express basis spline derivative in terms of interpolation values

x = [1 2 3 4 5]; y = randn(size(x)); k = 5; f = spapi(k,x,y); B = spapi(k,x,eye(length(x))); fdd = fnder(f, 2); Bdd = ...

4 meses hace | 0

| aceptada

Respondida

Use MATLAB Coder to convert matlab code to mex without using multi-threading

https://www.mathworks.com/help/coder/ug/use-parallel-for-loops.html

Use MATLAB Coder to convert matlab code to mex without using multi-threading

https://www.mathworks.com/help/coder/ug/use-parallel-for-loops.html

5 meses hace | 0

Respondida

How to get all possible combination With the total number of possible combination for "n" variables that can take different values

Checkout similar thread https://www.mathworks.com/matlabcentral/answers/476022-how-to-pick-up-all-combination-of-numbers-from-m...

How to get all possible combination With the total number of possible combination for "n" variables that can take different values

Checkout similar thread https://www.mathworks.com/matlabcentral/answers/476022-how-to-pick-up-all-combination-of-numbers-from-m...

5 meses hace | 0

| aceptada

Respondida

Possible issues with solving iterative linear systems with mldivide

"Is there a way to see the matrix solver steps to see which expressions might have an issue?" No they are LAPACK/BLAS based cod...

Possible issues with solving iterative linear systems with mldivide

"Is there a way to see the matrix solver steps to see which expressions might have an issue?" No they are LAPACK/BLAS based cod...

5 meses hace | 0

Respondida

Sparse matrix vector product returns null.

"What can cause this issue?" Nothing. What you claim likely would not happen. Unless if you show an example.

Sparse matrix vector product returns null.

"What can cause this issue?" Nothing. What you claim likely would not happen. Unless if you show an example.

5 meses hace | 0

| aceptada

Respondida

How to define if/else non linear constraint in an optimization problem

Simply solve three different optimization pbs with the three repectively constraints independently and ignore the two other, the...

How to define if/else non linear constraint in an optimization problem

Simply solve three different optimization pbs with the three repectively constraints independently and ignore the two other, the...

5 meses hace | 1

Respondida

How to use loop to fill in specific numbers?

T = combinations(1:4,1:8) % for alder release that does not support combinations [v1 v2] = meshgrid(1:4,1:8); v1 = v1(:); ...

How to use loop to fill in specific numbers?

T = combinations(1:4,1:8) % for alder release that does not support combinations [v1 v2] = meshgrid(1:4,1:8); v1 = v1(:); ...

5 meses hace | 0

Respondida

Error With Least Squares Approximation

Few other recommendations beside what Torsen and John altrady told you: Lower the polynomial order, do not go above 7, But you ...

Error With Least Squares Approximation

Few other recommendations beside what Torsen and John altrady told you: Lower the polynomial order, do not go above 7, But you ...

5 meses hace | 0

Enviada

Free-knot spline approximation

Least squares approximation of 1D data using free-knots spline

5 meses hace | 12 descargas |

Pregunta

ANY and ALL with NaN array

According to any documentation page, it " determines if any element is a nonzero number". OK to me NaN is nonzero number so I do...

5 meses hace | 1 respuesta | 0

Respondida

Make histogram from multiple cells.

% Generate dummy test data C=arrayfun(@(varargin)randn(5+randi(20),24), 1:30, 'unif', 0); A=cell2mat(C(:)); % m x 24, like c...

Make histogram from multiple cells.

% Generate dummy test data C=arrayfun(@(varargin)randn(5+randi(20),24), 1:30, 'unif', 0); A=cell2mat(C(:)); % m x 24, like c...

5 meses hace | 0

| aceptada

Respondida

My First Derivative is not correctly calculated in matlab

syms yApprox(X1) a0 a1 a2 a3 a4 a5 a6 yApprox = a0 + a1.*X1 + a2.*(X1).^2 + a3.*(X1).^3+ a4.*(X1).^4 + a5.*(X1).^5 + a6.*(X1).^...

My First Derivative is not correctly calculated in matlab

syms yApprox(X1) a0 a1 a2 a3 a4 a5 a6 yApprox = a0 + a1.*X1 + a2.*(X1).^2 + a3.*(X1).^3+ a4.*(X1).^4 + a5.*(X1).^5 + a6.*(X1).^...

5 meses hace | 0

| aceptada

Respondida

for loop vectorization of De Boor algorithm

Old question, but I'll reply it for future readers that wonder how to tackle the same problem. I did a quick and dirdty vectori...

for loop vectorization of De Boor algorithm

Old question, but I'll reply it for future readers that wonder how to tackle the same problem. I did a quick and dirdty vectori...

5 meses hace | 0

Respondida

Increase plot speed in MATLAB

Try to look at animatedline command Also look at drawnow with or without limitedrate option, it somewhat has certain effect, ev...

Increase plot speed in MATLAB

Try to look at animatedline command Also look at drawnow with or without limitedrate option, it somewhat has certain effect, ev...

5 meses hace | 0

| aceptada

Respondida

Error calculating inverse for matrix block of LU decomposition of a full row rank matrix

It's a little bit perturbant, but reading the lu doc I don't see why U1 must have the same rank than U (or A, meaning 100 on you...

Error calculating inverse for matrix block of LU decomposition of a full row rank matrix

It's a little bit perturbant, but reading the lu doc I don't see why U1 must have the same rank than U (or A, meaning 100 on you...

5 meses hace | 0

| aceptada

Respondida

de boor bspline algorithm

A very late answer, but as I deal myself with de Boor algorithm I look what exists out there. If the question concerns the 3D a...

de boor bspline algorithm

A very late answer, but as I deal myself with de Boor algorithm I look what exists out there. If the question concerns the 3D a...

5 meses hace | 0

Respondida

For a repeated eigenvalue only one eigenvctor is being returned

Indeed in case of eigenvalue with multiplicity > 1; the problemie is numerical challenging and MATLAB might fail to find the cor...

For a repeated eigenvalue only one eigenvctor is being returned

Indeed in case of eigenvalue with multiplicity > 1; the problemie is numerical challenging and MATLAB might fail to find the cor...

5 meses hace | 0

Respondida

How "chol" and "qz" MATLAB algorithms are utilised in the "eig" MATLAB function?

See stage 3 described in https://netlib.org/lapack/lug/node56.html or somewhere in this file

How "chol" and "qz" MATLAB algorithms are utilised in the "eig" MATLAB function?

See stage 3 described in https://netlib.org/lapack/lug/node56.html or somewhere in this file

5 meses hace | 0

| aceptada

Respondida

steps to convert spline from B-form to pp-form (fn2fm)

The pp-form stores the polynomial of each each subiterval, the variable is x := (t-ti) where ti is the left knot of interval #i....

steps to convert spline from B-form to pp-form (fn2fm)

The pp-form stores the polynomial of each each subiterval, the variable is x := (t-ti) where ti is the left knot of interval #i....

5 meses hace | 0

| aceptada

Respondida

How to extract a matrix of values from cell array of cell arrays of structs

Generate data (Thanks Voss) n1 = 3; n2 = 4; mse = cell(1,n1); for ii = 1:n1 mse{ii} = cell(1,n2); % row vector for...

How to extract a matrix of values from cell array of cell arrays of structs

Generate data (Thanks Voss) n1 = 3; n2 = 4; mse = cell(1,n1); for ii = 1:n1 mse{ii} = cell(1,n2); % row vector for...

5 meses hace | 0

| aceptada