Answered
How can I add ANN as an objective function or boundary conditions for GA?
Just call the predict() method wherever you need it.

2 years ago | 1

| accepted

Answered
How to move current account information to new computer ?
Depending on your license, you may be able to install Matlab on up to 4 computers. If this is your 5th computer, you may need to...

2 years ago | 0

Answered
Intersection of areas via polyshape
pgon1 = union(regions(polyshape(vertice1,'Simplify',1))); pgon2 = union(regions(polyshape(vertice2,'Simplify',1))); plot([...

2 years ago | 0

Answered
Can we use implicit array expansion across = sign?
2/ Does it matter? Is the memory overhead in using repmat irrelevant? It could matter. Most people would probably not bother to...

2 years ago | 0

| accepted

Answered
Retrospectively add graphs to tiled layout
Yes, change the Parent property of each of your plot axes from their initial figure window to the tiledlayout. plot(rand(1,5),'...

2 years ago | 1

| accepted

Answered
Problem In parfor loop
I would get rid of the first for-loop and use interp3 function [D] = ReducedData_DelayShift_Calculate(x_coordinates, y_coordina...

2 years ago | 0

| accepted

Answered
How do I train an existing shallow neural network with new data?
No, it does not forget them, as seen from this example, which talks about resuming a previous training attempt, https://www.mat...

2 years ago | 1

| accepted

Answered
Error using nnet.internal.cnngpu.convolveForwardNDBuiltin. Maximum variable size allowed on the device is exceeded.
You can use the memory command to see how close you are to your RAM limit. Basically, though, I would take the error at face val...

2 years ago | 0

Answered
Syntax for optimization with integer and continuous variables, nonlinear equalities and inequalities?
You only have 2^5=32 possible combinations of values for the integer variables x. The best thing to do would be to loop over the...

2 years ago | 1

Answered
Can you change 0^0=1 to 0^0=0 in Matlab?
No, you cannot. Well, actually, you could create your own subclass of type double (or other numeric types) and overload the pow...

2 years ago | 0

| accepted

Answered
Add a properties block to the class definition file course.m and define properties called Name, Level, and Waypoints.
There is no error. But the code you've shown was to be placed in a file called course.m

2 years ago | 0

Answered
Can you change 0^0=1 to 0^0=0 in Matlab?
No, you cannot.

2 years ago | 1

Answered
How to calculate the highest degree term with its coefficient in this expression with respect to t?
syms t x; expression = ((49*t^2 - 82600*t + 35060000)^(1/2)/550)*x; p=sym2poly((expression*550/x)^2) degree=numel(p) ...

2 years ago | 0

Answered
How can I reduce the run time a code?
Replace the whole for-loop over y with, index_control=ismember(aktivite1, aktivite2); m=find(index_control,1); index_cont...

2 years ago | 0

Answered
Vectorized generation of a cell
There is no way to create or manipulate cells without for-loops. Things like mat2cell, num2cell, etc... all have for-loops insid...

2 years ago | 0

| accepted

Answered
NonLinear Constraint not verified, although fmincon says it is
For the sqp algorithm, the ConstraintTolerance is relative, not absolute. See the table here, https://www.mathworks.com/help/op...

2 years ago | 0

| accepted

Answered
how to use getvarname
PtnBaseSA2 is an arraycell with many elements. I find the word "PtnBaseSA2" in some text and display some array indices of this ...

2 years ago | 0

| accepted

Answered
How to combine argument validation with varargin
This is one solution, but is very inconvenient, because it requires that I offload the argument checking to another function, ch...

2 years ago | 0

Question


How to combine argument validation with varargin
How can I make varargin work in conjunction with an arguments block? In the function below, the first two inputs W and p have ve...

2 years ago | 2 answers | 2

2

answers

Answered
display cell array vertically
Perhaps this is what you want, W1={{1,2},{3,4}} W2=reshape([W1{:}],2,[])'

2 years ago | 0

| accepted

Answered
Only plot outline of graph
Use movmax to get the upper envelope of a sequence of data points, and possibly smooth it with sgolayfilt, e.g., % Numerical da...

2 years ago | 0

Answered
Quickest way for alternate indexing a vector
n=9;c=[4;2]; s=c(1)+c(2); c(2)=s; u= 1 + c + (0:s:s*(n-1)); u=u(:)'

2 years ago | 3

Answered
Quickest way for alternate indexing a vector
n=9;c=[4;2]; s=c(1)+c(2); clear u u(2:2:2*n)=1+s:s:s*n+1; u(1:2:2*n)=u(2:2:2*n)-c(2)

2 years ago | 1

Answered
Is it possible to subsample an image by deleting data then interpolating to create a blurred image, while keeping the resulting image the same size as the original image?
siz=size(originalImage); tempImage=originalImage( 1:subsamplingFactor:end, 1:subsamplingFactor:end, :); blurredImage = im...

2 years ago | 0

| accepted

Answered
why putting a variable in a matrix divide it?
It is a 2x2 matrix, even though you might not like how it gets rendered in the Command Window. If it were not really a 2x2 matri...

2 years ago | 0

Answered
Two functions optimization and curve fitting
Either you have a bad initial guess, or a bad model. If the latter is true, we cannot help you. If the former is true, it may he...

2 years ago | 0

Answered
How to replace elements of one dimension of an n-D matrix based on values in the same dimension of another n-D matrix of equal dimensions?
Possible? Yes. Advisable? Not so sure. x(:,1,:)=x(:,1,:).*(y(:,1,:) ~= 1) + 99*(y(:,1,:) == 1);

2 years ago | 0

Answered
Estimate different trend lines and its slopes from a set of points
This FEX download, https://www.mathworks.com/matlabcentral/fileexchange/25872-free-knot-spline-approximation?s_tid=ta_fx_result...

2 years ago | 0

| accepted

Answered
I have to optimise an objective function within defined limits
You can set any nonlinear constraint functions that you want, though ideally it would be continuously differentiable. However, b...

2 years ago | 2

Load more