Answered
nvcc fatal : Could not set up the environment for Microsoft Visual Studio
For me, the solution was to install both Visual Studio and the Cuda Toolkit in a Windows user account with no whitespace charact...

6 years ago | 0

Answered
Why do i get different results when i perform convolution with different ways?
No, it's not the same procedure. conv2 performs linear convolution, wherease your fft method performs cyclic convolution. See al...

6 years ago | 0

| accepted

Answered
linprog. Alsway the answer is 0.
Whatever arrays i use with linprog the only answer it gives me is 0. Not these arrays. I'm sure we can come up with others as w...

6 years ago | 0

Answered
How to find repeated values in an array?
A = [26 24 28 35 31 34 33 31 33 31 33 28 35 25 31 26 30 26 28 29 27 30 26...

6 years ago | 1

Answered
Problem with the "lineprog" function
You must install the Optimization Toolbox.

6 years ago | 1

Answered
problem in matlab for sin and cos
Nope.

6 years ago | 0

Answered
lsqcurvefit/lsqnonlin algorithm is not responding to the third unknown variable
Note that, y data and x data are of the order of e-15 and e-8 respectively. Don't do that. Normalize your x and y data so that ...

6 years ago | 2

| accepted

Answered
why i get warning: Matrix is singular to working precision.
Because your kk matrix is singular.

6 years ago | 0

Answered
How to solve optimization problems when the constraints have derivative (symbolic) functions
The calculus needed to take the derivatives in your constraint expressions seems pretty trivial. Do you really need to go throug...

6 years ago | 0

Answered
How can I calculate the SVM hyperplane using fmincon?
Write the Lagrangian as where, uv=u.*v(:); H=-(eye(N)-uv*uv.')/2;

6 years ago | 0

Answered
Why is help() malfunctioning
I ran into this problem later. The problem turned out to be that Mathworks help.m file uses a command called strip(). This funct...

6 years ago | 0

| accepted

Answered
How to check 2D rectangle and 3D rectangular prism intersect with each other?
You can use intersectionHull() in this File Exchange submission, https://www.mathworks.com/matlabcentral/fileexchange/30892-ana...

6 years ago | 0

Answered
Is there a way to plot values containing an unknown constant on a particular axis?
I do not actually have the value of ϵ or U but want to see how the overall terms vary with increasing values U. Clearly they va...

6 years ago | 0

Answered
When is minimum p-norm solution independent of p?
Yes, there are possibilities for F0 that can make this happen, e.g. F0=[1 2 3 4 5]; fminsearch(@(w) norm(w-F0,1),3) fmins...

6 years ago | 1

| accepted

Answered
matlab Fit the third polynominal
This might be what you want: x=[0,12.5,25,37.5,50,62.5,75,87.5,100]; y=[10.0427, 10.3969,10.9316,11.5673,12.3015,13.1827,14.54...

6 years ago | 0

| accepted

Answered
Finding face vertices of a polygon
My spatialgraph2D class might be applicable, assuming the polygon edges are non-intersecting: https://www.mathworks.com/matlabc...

6 years ago | 1

Answered
Finding face vertices of a polygon
You cannot do what you propose with just a list of vertex indices. You need the x,y coordinates of the vertices themselves. Give...

6 years ago | 0

Answered
Why can't I use the mae error with the Levenber-Marquardt algorithm?
Why can't I use the mae with the trainlm? Just a guess, but Levenberg-Marquardt presumes that a Jacobian can be computed at the...

6 years ago | 1

| accepted

Answered
clarification about first order optimality
It is because you have not invoked the options SpecifyObjectiveGradient=true and SpecifyConstraintGradient=true in your call to ...

6 years ago | 0

| accepted

Answered
What optimization method can be used to solve the following optimization problem?
linprog would be appropriate. You could also use the problem-based framework to set up the problem. https://www.mathworks.com/h...

6 years ago | 0

| accepted

Question


Let other applications use Matlab's version of the CUDA toolkit
I have an external piece of CUDA code that needs to know the path to the CUDA Toolkit in order to compile. Rather than installin...

6 years ago | 2 answers | 2

2

answers

Answered
Methods to Speed-up fsolve
If the solutions are expected to evolve continuously, it can save time to use the last result as the initial guess for the next ...

6 years ago | 0

| accepted

Answered
How to make Visual Studio 2013 visible to Matlab 2018a
Well, restarting Matlab did not help, but rebooting the computer did.

6 years ago | 0

| accepted

Question


How to make Visual Studio 2013 visible to Matlab 2018a
I have installed Visual Studio 2013 Professional under Windows 10 and I have successfully used it to write, compile, and execute...

6 years ago | 1 answer | 0

1

answer

Answered
Why is pagemtimes slower on GPU than a CPU?
I don't have a Matlab version that supports pagemtimes, but for the GPU version, it might be advisable to instead try pagefun(@m...

6 years ago | 0

Answered
fmincon constraining some variables and not others
Setting A(i,i) and b(i) as 0 seems a waste of CPU since fmincon() will probably keep using a constrain that actually is not. In...

6 years ago | 1

| accepted

Answered
i am trying to find coefficients a0 , an and bn but the output for bn seems wrong and will not simplify
Well, here is what I get for bn, >> bn bn = [ 17202483417667977/4503599627370496, 0, 5734161139222659/4503599627370496,...

6 years ago | 0

Answered
Convert Column vector into matrix
H=histcounts(coln,1:257); result=((1:10).'<=H).*(1:256);

6 years ago | 1

| accepted

Answered
lsqcurvefit bad fitting results
Probably the sqrt() operation in your model function. There is nothing preventing the algorithm from searching in regions where ...

6 years ago | 0

Answered
Is it possible to add variables to my nonlinear constraints if they are not in the objective function?
Your initial guess x0=[20,20] contains only 2 elements but it should contain 5 because that is how many unknowns you have. If yo...

6 years ago | 0

| accepted

Load more