Answered

How to do Symbolic Optimization in matlab?

No, there is no function for that. For polynomials, you can proceed by dy = diff(y, x); extrema = solve(dy, x); d2y = diff(d...

How to do Symbolic Optimization in matlab?

No, there is no function for that. For polynomials, you can proceed by dy = diff(y, x); extrema = solve(dy, x); d2y = diff(d...

2 days ago | 1

Answered

Is there a way to lock the cursor on the graph?

https://www.mathworks.com/matlabcentral/fileexchange/3265-magnetginput

Is there a way to lock the cursor on the graph?

https://www.mathworks.com/matlabcentral/fileexchange/3265-magnetginput

2 days ago | 0

Answered

Error: Undefined function 'mtimes' for input arguments of type 'cell' -2

P1{io,jo} = NumericalFourierForce{io,1}{jo,1}(1:L/2+1); The assignment on that line would fail if P1 is an existing variable th...

Error: Undefined function 'mtimes' for input arguments of type 'cell' -2

P1{io,jo} = NumericalFourierForce{io,1}{jo,1}(1:L/2+1); The assignment on that line would fail if P1 is an existing variable th...

2 days ago | 0

| accepted

Answered

How do i get the table to access all my iterative data?

%xi = iterations %ap = approximate value %pe = percet error recorded % pe desired 1*10^-5 x= -0.95; while(1) x...

How do i get the table to access all my iterative data?

%xi = iterations %ap = approximate value %pe = percet error recorded % pe desired 1*10^-5 x= -0.95; while(1) x...

2 days ago | 0

Answered

Given that you have the code below, how do you write a code to count the number of points in each quadrant with the attached data set

Supposing your two variables are named v1 and v2, then counts = accumarray([1+(v1(:)>=mean(v1)), 1+(v2(:)>=mean(v2))], 1, [2 2]...

Given that you have the code below, how do you write a code to count the number of points in each quadrant with the attached data set

Supposing your two variables are named v1 and v2, then counts = accumarray([1+(v1(:)>=mean(v1)), 1+(v2(:)>=mean(v2))], 1, [2 2]...

2 days ago | 0

Answered

How can I convert an image into a patch?

Would a surface be acceptable instead of a patch? If so then see warp() https://www.mathworks.com/help/images/ref/warp.html If...

How can I convert an image into a patch?

Would a surface be acceptable instead of a patch? If so then see warp() https://www.mathworks.com/help/images/ref/warp.html If...

2 days ago | 0

Answered

Convert it into index type

[image_mat, cmap] = imread('flage.png'); if isempty(cmap) if ndims(image_mat) > 2 ...

Convert it into index type

[image_mat, cmap] = imread('flage.png'); if isempty(cmap) if ndims(image_mat) > 2 ...

2 days ago | 0

| accepted

Answered

Hoe to implement a listener that deletes its calling object?

The right way would probably be not to do that at all. Instead, put in a position constraint that prevents the ROI from moving ...

Hoe to implement a listener that deletes its calling object?

The right way would probably be not to do that at all. Instead, put in a position constraint that prevents the ROI from moving ...

2 days ago | 0

Answered

Image Grey to Color

B = imcrop(img,[1, 1, w, h_one]); What is the first row number that will be extracted when you do that? What is the last row nu...

Image Grey to Color

B = imcrop(img,[1, 1, w, h_one]); What is the first row number that will be extracted when you do that? What is the last row nu...

2 days ago | 0

Answered

can someone decode this content for me {"device-time":1593728176.593425,"feature":"event_log","message":"{\"eav\":[\"MSGThreadViewController\",\"LSViewController:inbox\",null,null,null,null],\"event_id\":110,\"event_instance_id\":0,\"event_type\":1}"

No, without context, no-one here is going to be able to interpret the log for you. One thing that I can say, though, is that th...

can someone decode this content for me {"device-time":1593728176.593425,"feature":"event_log","message":"{\"eav\":[\"MSGThreadViewController\",\"LSViewController:inbox\",null,null,null,null],\"event_id\":110,\"event_instance_id\":0,\"event_type\":1}"

No, without context, no-one here is going to be able to interpret the log for you. One thing that I can say, though, is that th...

2 days ago | 0

Answered

Dimensions of matrices being concatenated are not consistent ?

I notice that you are using R2016a, so I will not mention some of the possibilities for later releases You cannot do that with ...

Dimensions of matrices being concatenated are not consistent ?

I notice that you are using R2016a, so I will not mention some of the possibilities for later releases You cannot do that with ...

2 days ago | 0

Answered

what does "parpool close force local" mean?

Something like, if numProc <= 1 p = gcp('nocreate'); if ~isempty(p) delete(p); end poolSize = 0; ...

what does "parpool close force local" mean?

Something like, if numProc <= 1 p = gcp('nocreate'); if ~isempty(p) delete(p); end poolSize = 0; ...

3 days ago | 0

| accepted

Answered

Endpoints of drawline()

h = drawline(); ep = h.Position; x1 = ep(1,1); y1 = ep(1,2); x2 = ep(2,1); y2 = ep(2,2); https://www.mathworks.com/...

Endpoints of drawline()

h = drawline(); ep = h.Position; x1 = ep(1,1); y1 = ep(1,2); x2 = ep(2,1); y2 = ep(2,2); https://www.mathworks.com/...

3 days ago | 1

| accepted

Answered

Tools used for Sparse Matrix Efficiency

used_count = ceil(n + X*Y*Z*6); A = spalloc(n, n, used_count); for i = 1 : n; A(i,i) = -6; end for ix = 1:X for iy = 1:Y...

Tools used for Sparse Matrix Efficiency

used_count = ceil(n + X*Y*Z*6); A = spalloc(n, n, used_count); for i = 1 : n; A(i,i) = -6; end for ix = 1:X for iy = 1:Y...

3 days ago | 2

Answered

Hex to binary character array

a = '8000000000200000000000000000000005e380924000012808800000c0000000000000000013f000111f0000000000000000'; b = reshape(dec2bin...

Hex to binary character array

a = '8000000000200000000000000000000005e380924000012808800000c0000000000000000013f000111f0000000000000000'; b = reshape(dec2bin...

3 days ago | 1

Answered

Export a matrix variable "losslessly" as a .txt file

If it is numeric, then dlmwrite() with '%.16g' If I recall correctly, save -double uses 15 digits instead of 16, but you could...

Export a matrix variable "losslessly" as a .txt file

If it is numeric, then dlmwrite() with '%.16g' If I recall correctly, save -double uses 15 digits instead of 16, but you could...

3 days ago | 0

Answered

using fget1 to read text file. Need help sorting data

https://github.com/manromao/RINEX-reader

using fget1 to read text file. Need help sorting data

https://github.com/manromao/RINEX-reader

3 days ago | 0

Answered

Simple assertion giving incorrect result?

Symbolic floating point values have some guard digits that are not displayed when you output the number

Simple assertion giving incorrect result?

Symbolic floating point values have some guard digits that are not displayed when you output the number

3 days ago | 0

Answered

Unable to perform assignment because the size of the left side is 7-by-1 and the size of the right side is 7-by-7

The boundary conditions, h, will always be passed to the function as a column vector even if you initialize as a row vector. You...

Unable to perform assignment because the size of the left side is 7-by-1 and the size of the right side is 7-by-7

The boundary conditions, h, will always be passed to the function as a column vector even if you initialize as a row vector. You...

3 days ago | 0

| accepted

Answered

i=1, 2, 3,,, However, when (a-i)> 0 is calculated.

for i = 1 : a - 1 station(i+2) = (4-(4-i))*N; end

i=1, 2, 3,,, However, when (a-i)> 0 is calculated.

for i = 1 : a - 1 station(i+2) = (4-(4-i))*N; end

3 days ago | 0

Answered

Is this program free from bugs? The program is to find the position of the element greater than 100.

The program will not work properly if readings is two or more dimensional. The program will fail when it encounters the return ...

Is this program free from bugs? The program is to find the position of the element greater than 100.

The program will not work properly if readings is two or more dimensional. The program will fail when it encounters the return ...

3 days ago | 0

| accepted

Answered

Bug in MATLAB evaluation of generalized hypergeometric functions (for relatively larger arguments)

Do not use inline() anymore. Use matlabFunction() or build an anonymous function or a symbolic expression or a symbolic function...

Bug in MATLAB evaluation of generalized hypergeometric functions (for relatively larger arguments)

Do not use inline() anymore. Use matlabFunction() or build an anonymous function or a symbolic expression or a symbolic function...

3 days ago | 2

| accepted

Answered

How to convert a char letter into a double which is still a letter.

If you are getting user inputs that are formula, then you should use str2func() to turn them into function handles. Alternately...

How to convert a char letter into a double which is still a letter.

If you are getting user inputs that are formula, then you should use str2func() to turn them into function handles. Alternately...

4 days ago | 0

| accepted

Answered

plot3 not functioning

When you "hold on" the view() is one of the things that is held. You are using hold on before you do any 3d plotting so the 2d ...

plot3 not functioning

When you "hold on" the view() is one of the things that is held. You are using hold on before you do any 3d plotting so the 2d ...

4 days ago | 0

Answered

How long does the academic license last?

Term: Annual tells you that this is a one year license.

How long does the academic license last?

Term: Annual tells you that this is a one year license.

4 days ago | 1

| accepted

Answered

Solve Inequality with inequality constraints

There is no symbolic solution; the equations are too complicated for that. syms I I_opt real Q = @(v) sym(v); a = Q(0.17...

Solve Inequality with inequality constraints

There is no symbolic solution; the equations are too complicated for that. syms I I_opt real Q = @(v) sym(v); a = Q(0.17...

4 days ago | 0

| accepted

Answered

InstallForMacOSX doesn't work with my OS X 10.10.5. What should I do to install R2020a?

https://www.mathworks.com/content/dam/mathworks/mathworks-dot-com/support/sysreq/files/SystemRequirements-Release2017a_Macintosh...

InstallForMacOSX doesn't work with my OS X 10.10.5. What should I do to install R2020a?

https://www.mathworks.com/content/dam/mathworks/mathworks-dot-com/support/sysreq/files/SystemRequirements-Release2017a_Macintosh...

4 days ago | 1

| accepted

Answered

handle character minus character

If you have a recent enough MATLAB version, pass the character vectors to duration() and then subtract one from the other. If y...

handle character minus character

If you have a recent enough MATLAB version, pass the character vectors to duration() and then subtract one from the other. If y...

4 days ago | 0

Answered

How to build a symbolic function based on other symbolic functions？

When you use a symbolic function (by name, with no parameters) with a binary operator, and the other operand does not involve sy...

How to build a symbolic function based on other symbolic functions？

When you use a symbolic function (by name, with no parameters) with a binary operator, and the other operand does not involve sy...

4 days ago | 1

| accepted

Answered

Error Variable Spectrum has an incorrect value.

You did not emit newlines after the color names.

Error Variable Spectrum has an incorrect value.

You did not emit newlines after the color names.

4 days ago | 0