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

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

2 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],...

2 years ago | 0

| accepted

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

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

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

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

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

2 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')

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

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

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

Load more