Answered
Regression of a vector in a optimization problem
As the others have said, all regression routines in the Optimization Toolbox allow you to represent the unknown variable in vect...

12 days ago | 0

| accepted

Answered
abstract class with inherite handle class
You cannot create an instance of an abstract class. Also, your constructor expects arguments EEG and INFO, which you have not pr...

14 days ago | 1

Answered
indexing takes a very long time
It takes a long time because every time you execute the line b = A(i:i+10,i+10,:) memory is allocated for b. Instead of itera...

14 days ago | 0

Answered
How to setup gamultiobj to "explore farther" along a specific objective?
Maybe redefine Obj2 so that it jumps from 16.6 to infinity, Obj2 = Obj2-1+1/(Obj2<16.6)

14 days ago | 0

Answered
Loss function in CNN
I expect you might have to feed the hidden layer outputs forward, making them inputs/outputs of your custom output layer. That w...

16 days ago | 0

Answered
How to add an extra column to a 1x1 structure
I can't be sure from your description exactly what you are trying to do, but it sounds like a table might be much better for wha...

16 days ago | 0

| accepted

Answered
Extracting part of an image
Use impoly instead of drawpolygon. Use the createMask() method of the impoly object h to extract the ROI pixels pixelvalues = y...

16 days ago | 0

Answered
How to find out the cordinates of the intersection point of a line and a surface?
Plug the equation for the line into the equation for the surface and use fzero to find the root. This root will give the locatio...

26 days ago | 1

| accepted

Answered
How to make a long equation line more efficient?
I thought this should help because I have hundreds of these instances If the expression came from matlabFunction, be sure you a...

26 days ago | 0

Answered
Finding threshold for skull segmentation of Head CT images
What about multithresh()?

26 days ago | 0

| accepted

Answered
"fmincon" optimization with nonlinear constraints: colon error
You are returning a function handle in c_eq, when really you should be evaluating the function at Cpv, c_eq = Anonymous(Cpv); ...

26 days ago | 0

| accepted

Answered
Fast 2D distance calculation
If you have the Parallel Computing Toolbox, you can execute the computations on the GPU just by building p1 and pn as gpuArrays....

27 days ago | 0

Submitted


Structure fields to variables
Code writing tool for importing/exporting workspace variables to or from a struct.

27 days ago | 30 downloads |

Answered
Can I Dynamically Overload A Class Method?
You can't dynamically overload a class method, but you can get the same effect by making function handle properties that dictate...

27 days ago | 0

Answered
Division by an OptimizationVariable not supported.
The problem-based solver is largely limited to linear and (in R2019) quadratic programs. If you find yourself computing non-line...

29 days ago | 0

| accepted

Answered
How to use Matlab to fill gaps
This might be what you are looking for Mnew=M; [nr,nc]=size(M); xq=(1:nr).'; for i=1:nc m=M(:,i); ...

29 days ago | 1

| accepted

Answered
How to use linear interpolation for filling with 3s inside empty spaces in a matrix of os and 3s
One way: result = sqrt(cummax(M,1).*cummax(M,1,'reverse'))

29 days ago | 0

Answered
lsqcurvefit not adjusting some parameters as expected
It helps to pre-normalize your x,y data and to use polyfit to generate a smart initial guess, %data pre-normalization y=y.'/ma...

29 days ago | 0

| accepted

Answered
How could you modify this semi-infinite optimization to global optimization using GlobalSearch?
If you could show me how to modify this MathWorks example, then I could modify my scripts. It would look like below, myfun=@(x...

29 days ago | 1

| accepted

Question


Set union of Datastores with TransformedDatastores
Given an imageDatastore and some transformation of it, e.g., imds1 = imageDatastore({'street1.jpg','peppers.png'}); imds2 = ...

29 days ago | 1 answer | 1

1

answer

Answered
Finding global minimum with fseminf
Is it a good strategy to call fseminf lots of times with different starting values? It's not a bad strategy, but no strategy is...

30 days ago | 0

| accepted

Answered
I need to solve four differential equation with four unknown variable simltaneously . how can i do that in matlab?
In all likelihood, your problem description is incomplete. As written currently, the problem has the trivial solution, K1=K2=K3...

1 month ago | 0

Answered
Error in fmincon: undefined getIpOptions
Well, it should be there. On my machine, >> which -all getIpOptions F:\Program Files\MATLAB\R2018b\toolbox\optim\optim\getIpOp...

1 month ago | 0

Answered
Optimization of discontinuous function where function constants come from an array.
Reformulate the problem as the following linear program in x and N_{i,y} The solution has to have the ...

1 month ago | 1

| accepted

Answered
Translation and simultaneous rotation
Have a look at hgtransform https://www.mathworks.com/help/matlab/ref/hgtransform.html#f59-724021

1 month ago | 0

Answered
convex hull in 3D binary matrix
It sounds like imdilate() is all that you need. Just choose the strel to be the shape of the convex neighborhood that you want.

1 month ago | 0

Answered
MATLAB Compiler and MATLAB RUNTIME
You must deploy the 2018 runtime.

1 month ago | 0

Question


Semantic segmentation using numeric array training input
I have a series of P images, each MxNxC (in other words C channels) organized as a 4D numeric array X where size(X) is [M,N,C,P]...

1 month ago | 1 answer | 0

1

answer

Answered
construct a 2d image in different planes from a stack of 2d images
No, I don't see why the code you've shown wouldn't work all the time, as long as y_ceil is a valid index.

1 month ago | 0

Answered
Convert a vector in Character array after a for loop
Perhaps this is what you want? >> f=[1,2,3,4], F=char(64+f) f = 1 2 3 4 F = 'ABCD'

1 month ago | 0

Load more