Answered

Trying to supply fsolve with system's Jacobian but receiving error ''check for incorrect argument data type"

It is not clear (from what you posted), why you are using symbolic variable manipulation at all. fsolve is a numerical solver, n...

Trying to supply fsolve with system's Jacobian but receiving error ''check for incorrect argument data type"

It is not clear (from what you posted), why you are using symbolic variable manipulation at all. fsolve is a numerical solver, n...

7 días ago | 0

| accepted

Answered

Rotate Values of Matrix

Use imtranslate() to center the source in the image, then use imrotate() it by the desired angle, then use imtranslate() once mo...

Rotate Values of Matrix

Use imtranslate() to center the source in the image, then use imrotate() it by the desired angle, then use imtranslate() once mo...

7 días ago | 0

Answered

Get the last for digits as the time this message was sent

Is this what you want? str=char( "!AIVDM,1,1,,A,13cut>1001P:3LRGa`P@jip400S<,0*410002" ) str(end-3:end)

Get the last for digits as the time this message was sent

Is this what you want? str=char( "!AIVDM,1,1,,A,13cut>1001P:3LRGa`P@jip400S<,0*410002" ) str(end-3:end)

7 días ago | 1

| accepted

Answered

Is it possible to set an upper limit on the step size used by fsolve?

You could try playing with the InitDampling option parameter used by the Levenberg-Marquardt method.

Is it possible to set an upper limit on the step size used by fsolve?

You could try playing with the InitDampling option parameter used by the Levenberg-Marquardt method.

7 días ago | 0

Answered

Am I understanding this correctly?

If by "low" you mean zero and by "high" you mean 255, then yes.

Am I understanding this correctly?

If by "low" you mean zero and by "high" you mean 255, then yes.

7 días ago | 0

Answered

Not sure why while loop won't run.

balance(1) = 1000; contribution = 1200; interest = 0.0025; M = 2; % month ticker while balance(end) < 500000 ba...

Not sure why while loop won't run.

balance(1) = 1000; contribution = 1200; interest = 0.0025; M = 2; % month ticker while balance(end) < 500000 ba...

8 días ago | 2

| accepted

Answered

How select data just out from a polygon, considering a constraint

borders=[0,0;0,1;1 1;1 0]; p=polyshape(borders); p=blurHull(p,[0.3,0]); p=blurHull(p,[0, 0.1]); isinterior(p,datas) ...

How select data just out from a polygon, considering a constraint

borders=[0,0;0,1;1 1;1 0]; p=polyshape(borders); p=blurHull(p,[0.3,0]); p=blurHull(p,[0, 0.1]); isinterior(p,datas) ...

8 días ago | 0

| accepted

Answered

Creating Matrix Subset automatic.

You should be doing it as follows: S=A([1,4,7],:);

Creating Matrix Subset automatic.

You should be doing it as follows: S=A([1,4,7],:);

8 días ago | 0

| accepted

Answered

How can I sort vector according to its index?

[vect,ind]=sort(vect,'descend')

How can I sort vector according to its index?

[vect,ind]=sort(vect,'descend')

8 días ago | 0

Answered

Plotting Phase Plane in Matlab

For example, funx=@(t) c1*exp(-3*t)+c2*exp(-t); funy=@(t) -c1*exp(-3*t); fplot(funx,funy,[0,1]) or t=linspace(0,1,100); ...

Plotting Phase Plane in Matlab

For example, funx=@(t) c1*exp(-3*t)+c2*exp(-t); funy=@(t) -c1*exp(-3*t); fplot(funx,funy,[0,1]) or t=linspace(0,1,100); ...

8 días ago | 0

Answered

Unable to perform assignment because the indices on the left side are not compatible with the size of the right side

parfor i=1:16000 tmp=double(solve(f==A(i),x)); if isempty(tmp), warning 'No sol...

Unable to perform assignment because the indices on the left side are not compatible with the size of the right side

parfor i=1:16000 tmp=double(solve(f==A(i),x)); if isempty(tmp), warning 'No sol...

9 días ago | 1

| accepted

Answered

Newton's method

Tab=[]; for x = -1:0.05:5 Tab = [Tab , newton(@f1,@df1,x,10^(-8)) ] end

Newton's method

Tab=[]; for x = -1:0.05:5 Tab = [Tab , newton(@f1,@df1,x,10^(-8)) ] end

9 días ago | 0

| accepted

Answered

add a row to a matrix each loop

Just concatenate: A=eye(5) newrow=rand(1,5); A=[A;newrow]

add a row to a matrix each loop

Just concatenate: A=eye(5) newrow=rand(1,5); A=[A;newrow]

9 días ago | 0

Answered

Registering two images where the camera has translated

The default multi-modal options seem to work pretty well. imreader=@(z,s) imresize(rgb2gray(imread(z)),s); %Register at ...

Registering two images where the camera has translated

The default multi-modal options seem to work pretty well. imreader=@(z,s) imresize(rgb2gray(imread(z)),s); %Register at ...

9 días ago | 0

| accepted

Answered

How to draw 9 cones using kronecker product?

If you have the matrix of surface values of a single cone, you could simply do, surf(kron(ones(3), singleCone))

How to draw 9 cones using kronecker product?

If you have the matrix of surface values of a single cone, you could simply do, surf(kron(ones(3), singleCone))

9 días ago | 0

Answered

Why does my matrix give me a syntax error

(It follows the END that terminates the definition of the function "Fnorm".) That is not allowed. All local functions must be p...

Why does my matrix give me a syntax error

(It follows the END that terminates the definition of the function "Fnorm".) That is not allowed. All local functions must be p...

9 días ago | 0

Answered

How can I make MATLAB shade the area of the virtual intersection between two lines?

You can use fill() or patch().

How can I make MATLAB shade the area of the virtual intersection between two lines?

You can use fill() or patch().

9 días ago | 1

Answered

How to select rectangle ROI in the image and adjust the position of ROI manually. Then it can return the adjusted ROI position

h=drawrectangle(); wait(h); You must double-click on the rectangle to confirm its position and return control to Matlab.

How to select rectangle ROI in the image and adjust the position of ROI manually. Then it can return the adjusted ROI position

h=drawrectangle(); wait(h); You must double-click on the rectangle to confirm its position and return control to Matlab.

10 días ago | 0

| accepted

Answered

Mirrored ifft and ifft2

If you do ifft(x,'symmetric'), the actual right hand side values will be ignored, or rather assumed to be a mirroring of the lef...

Mirrored ifft and ifft2

If you do ifft(x,'symmetric'), the actual right hand side values will be ignored, or rather assumed to be a mirroring of the lef...

10 días ago | 0

Answered

How to change optimization variable

You cannot do that in a continuous optimization problem, although in sparse optimization, it is common to approximate the number...

How to change optimization variable

You cannot do that in a continuous optimization problem, although in sparse optimization, it is common to approximate the number...

10 días ago | 1

| accepted

Answered

Curve fitting with set area

The area constraint is non-linear. You would have to use fmincon instead.

Curve fitting with set area

The area constraint is non-linear. You would have to use fmincon instead.

10 días ago | 0

| accepted

Answered

fsolve doesn't find a solution when the value of the objective function is obtained through a Montecarlo simulation

Does your Monte Carlo simulation also compute an approximation to the Jacobian, or are you relying on fsolve's default finite di...

fsolve doesn't find a solution when the value of the objective function is obtained through a Montecarlo simulation

Does your Monte Carlo simulation also compute an approximation to the Jacobian, or are you relying on fsolve's default finite di...

10 días ago | 0

Answered

Quadratic Constraints/Optimization error in Matlab 2020b but not Matlab 2020a

Was MATLAB running an old version of strjoin.m that was incompatible with the problem based optimization? Yes, it appears that ...

Quadratic Constraints/Optimization error in Matlab 2020b but not Matlab 2020a

Was MATLAB running an old version of strjoin.m that was incompatible with the problem based optimization? Yes, it appears that ...

11 días ago | 0

Answered

why my matlab didn't plot anything?

m = 85; g = 9.81; ti = 0; tf1 = 9 ; v(1)= -20; h = 1; c1 = 11; dv1 = @(g,c1,v,m) g-c1*v/m; k=1; while(ti<tf1) ...

why my matlab didn't plot anything?

m = 85; g = 9.81; ti = 0; tf1 = 9 ; v(1)= -20; h = 1; c1 = 11; dv1 = @(g,c1,v,m) g-c1*v/m; k=1; while(ti<tf1) ...

11 días ago | 1

Answered

Remove steps of adjacent points

Perhaps as follows: threshold=0.5; t=0:0.01:3; signal=log(mod(t,1)+1); D=diff(signal(:).'); D(abs(D)>threshold)=0; ...

Remove steps of adjacent points

Perhaps as follows: threshold=0.5; t=0:0.01:3; signal=log(mod(t,1)+1); D=diff(signal(:).'); D(abs(D)>threshold)=0; ...

11 días ago | 1

| accepted

Answered

simple fmincon problem, optimization toolbox

The point X=[0,0,0] is a first order local minimum. It is a point of zero-gradient, and it satisfies the constraints. You made a...

simple fmincon problem, optimization toolbox

The point X=[0,0,0] is a first order local minimum. It is a point of zero-gradient, and it satisfies the constraints. You made a...

11 días ago | 0

Answered

How to get matrix indices from roipoly

You must interchange the coordinates (i,j)=(yi2,xi2)

How to get matrix indices from roipoly

You must interchange the coordinates (i,j)=(yi2,xi2)

11 días ago | 0

| accepted

Answered

Is it possible to set an upper limit on the step size used by fsolve?

I've tried using fmincon with the same initial guesses as fsolve without success: A simpler option than fmincon would be to us...

Is it possible to set an upper limit on the step size used by fsolve?

I've tried using fmincon with the same initial guesses as fsolve without success: A simpler option than fmincon would be to us...

11 días ago | 0

| accepted

Answered

Problem in calculating median and average values at specific intervals.

valid=(Phase~=0); G=findgroups(round(Temp(valid),0)); Radius=Radius(valid); Phase=Phase(valid); medianRadius=splitapply(...

Problem in calculating median and average values at specific intervals.

valid=(Phase~=0); G=findgroups(round(Temp(valid),0)); Radius=Radius(valid); Phase=Phase(valid); medianRadius=splitapply(...

11 días ago | 0

| accepted

Answered

How to use unique in an mxn matrix without sorting the columns?

A = [7, 2, 1, 1; 3, 2, 9, 9] a_no_duplicate = unique(A.', 'rows').' a_no_duplicate_no_sort = unique(A.', 'rows','stable').'

How to use unique in an mxn matrix without sorting the columns?

A = [7, 2, 1, 1; 3, 2, 9, 9] a_no_duplicate = unique(A.', 'rows').' a_no_duplicate_no_sort = unique(A.', 'rows','stable').'

11 días ago | 1

| accepted