Beantwortet
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...

mehr als 2 Jahre vor | 0

Beantwortet
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...

mehr als 2 Jahre vor | 1

Beantwortet
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...

mehr als 2 Jahre vor | 0

| akzeptiert

Beantwortet
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

mehr als 2 Jahre vor | 0

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

mehr als 2 Jahre vor | 1

Beantwortet
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) ...

mehr als 2 Jahre vor | 0

Beantwortet
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...

mehr als 2 Jahre vor | 0

Beantwortet
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...

mehr als 2 Jahre vor | 0

| akzeptiert

Beantwortet
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...

mehr als 2 Jahre vor | 0

| akzeptiert

Beantwortet
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 ...

mehr als 2 Jahre vor | 0

| akzeptiert

Beantwortet
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...

mehr als 2 Jahre vor | 0

Frage


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...

mehr als 2 Jahre vor | 2 Antworten | 2

2

Antworten

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

mehr als 2 Jahre vor | 0

| akzeptiert

Beantwortet
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...

mehr als 2 Jahre vor | 0

Beantwortet
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(:)'

mehr als 2 Jahre vor | 3

Beantwortet
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)

mehr als 2 Jahre vor | 1

Beantwortet
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...

mehr als 2 Jahre vor | 0

| akzeptiert

Beantwortet
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...

mehr als 2 Jahre vor | 0

Beantwortet
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...

mehr als 2 Jahre vor | 0

Beantwortet
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);

mehr als 2 Jahre vor | 0

Beantwortet
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...

mehr als 2 Jahre vor | 0

| akzeptiert

Beantwortet
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...

mehr als 2 Jahre vor | 2

Beantwortet
Fill a specific region of fcontour without generating a mesh
Using the FEX download getContourLineCoordinates, fun=@(x,y)x.^2+y.^2-1; M=fcontour(fun,[-pi pi -pi pi],'LevelList',[0,1,2...

mehr als 2 Jahre vor | 3

| akzeptiert

Beantwortet
How do you convert the left picture (a) into the right picture (b) using image processing toolbox?
[R,G,B]=imsplit(imread('Image.png')); BW=imfill( bwareaopen(R>130 & G>130 & B>110,10) ,'holes'); imshow(~BW)

mehr als 2 Jahre vor | 0

| akzeptiert

Beantwortet
Optimizing a matrix of values
You could define the whole matrix as unknown, but with diagonal elements bound to zero: LB=-inf(n); LB(1:n+1:end)=0; UB=-LB;...

mehr als 2 Jahre vor | 0

| akzeptiert

Beantwortet
groupcounts and sum of data in another array in the same order
accumarray(findgroups(A(:)), B(:))

mehr als 2 Jahre vor | 0

Beantwortet
groupcounts and sum of data in another array in the same order
splitapply(@sum,B,findgroups(A))

mehr als 2 Jahre vor | 0

Beantwortet
How to find the optimum number of neurons and hidden layers for ANN?
By trial and error, though you can automate some of that using the Experiment Manager.

mehr als 2 Jahre vor | 0

Beantwortet
how to enlarge ROI around its boundary?
Isn't there something available that operates directly on the position data of Matlab ROI objects...? You can make a polyshape ...

mehr als 2 Jahre vor | 0

Mehr laden