Answered
Is it possible to concatenate sub-structures within structures into single variables?
A double nested loop could be used, e.g., for A=string(fieldnames(Struct1))' for B=string(fieldnames(Struct1.(A)))' ...

3 years ago | 0

| accepted

Answered
How do I find the interval in which a function is increasing ?
You would take the derivative and examine where the derivative is non-negative.

3 years ago | 1

Answered
Keeping only rows in a matrix that are above a threshold
For example, subTable = yourTable( yourTable{:,9}>height_F, : )

3 years ago | 1

| accepted

Answered
Can't improve a near-zero training accuracy for sequence-to-label 1D CNN over a signal datastore
As far as we can say, you've only tried a single combination of training hyperparameters. You need to explore different combinat...

3 years ago | 0

Answered
Updating Structure Input for Functions
If you had as follows, it would work for any fruit, wouldn't it? fruit.Mass = 0.15; %kg fruit.Height = 4; %m

3 years ago | 0

Answered
How do I repetitively shuffle elements in my matrix column-wise?
F=magic(5) [m,n]=size(F); [~,I]=sort(rand([m,n])); J=repmat(1:n,m,1); Fshuffle = F(sub2ind([m,n],I,J))

3 years ago | 0

| accepted

Answered
Very weird Dot indexing is not supported for variables of this type
You have only passed 3 arguments to DetailGroup when it expects 4. Therefore, it is trying to do operations in which the double ...

3 years ago | 0

Answered
The “fmincon” function did not achieve the result I wanted
clc, w0 = rand(1,5)/5; Aeq = ones(1,5); beq = 1; lb=zeros(5,1); ub=lb+1; tol=1e-14; opts=optimoptions(@fmincon,'StepTo...

3 years ago | 0

| accepted

Answered
What is the best way to add empty rows to an existing table, to pre-allocate for more data?
T = table(["One"; "Two"; "Three"], [1; 2; 3], ['the'; 'cat'; 'sat'], {{1 2 3}; {4 5 6}; {7 8 9}}) newlength=10; T(newlengt...

3 years ago | 1

| accepted

Answered
Determine in what interval a variable is
Use discretize. ElapsedTime = [0.13 0.35 0.74 1.02 1.39 1.80 2.50]; t = 0:0.01:ElapsedTime(end); phases = discretize(t, [...

3 years ago | 1

| accepted

Answered
How to get the value of slopes of pchip at the enpoints?
You don't need to determine the end slopes to extrapolate X. Just use the 'extrap' option to obtain values where desired outsid...

3 years ago | 0

Answered
A Maximum Likelihood estimation with fminunc
Is perhaps the 'quasi-newton' algorithm the wrong choice for a log-function? More likely, the solution is correct, but your ex...

3 years ago | 1

Answered
the directed graph of USA
You can download spatialgraph2D, https://www.mathworks.com/matlabcentral/fileexchange/73630-spatialgraph2d G=digraph([1 2 3],...

3 years ago | 0

| accepted

Answered
Questions about operation A\B
See flowchart here, https://www.mathworks.com/help/matlab/ref/mldivide.html#bt4jslc-6

3 years ago | 0

| accepted

Answered
What's the point of 'isinf' function ?
For one thing, it covers cases were the inf elements have mixed signs, thus avoiding the overhead of additional operations like ...

3 years ago | 0

Answered
I have a 64*64 block matrix, each block of size 4*4. I need to extract the diagonals of each block as a vector.
A faster method is to use this FEX download, https://www.mathworks.com/matlabcentral/fileexchange/115340-block-transposition-pe...

3 years ago | 0

Answered
How to know how many pixels are a millimeter in my image?
You need to know the length in millimeters of a particular object or feature in the image to make that conversion.

3 years ago | 0

Answered
Why does fmincon give me wrong results?
The problem has a very simple analytical solution. Why use fmincon at all? [fval,i]=max(2*(x-1)^4, 2*(x+1)^4); dx=2*i-3; In...

3 years ago | 0

| accepted

Answered
Improving the efficiency of triple nested loop
It seems like you could just use bwdist, poresize = 2*max(bwdist(tiff),[],'all')

3 years ago | 1

Answered
Error Network: Missing output layer
The "output layer" referred to by the error message doesn't refer to the final decoder in the network. An output layer is a spec...

3 years ago | 0

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

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

3 years ago | 0

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

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

3 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),'...

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

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

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

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

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

3 years ago | 0

| accepted

Load more