Réponse apportée
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 ...

plus de 2 ans il y a | 0

Réponse apportée
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...

plus de 2 ans il y a | 0

Réponse apportée
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.

plus de 2 ans il y a | 0

Réponse apportée
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...

plus de 2 ans il y a | 0

| A accepté

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

plus de 2 ans il y a | 1

Réponse apportée
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...

plus de 2 ans il y a | 0

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

plus de 2 ans il y a | 1

| A accepté

Réponse apportée
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...

plus de 2 ans il y a | 0

Réponse apportée
Intersection of areas via polyshape
pgon1 = union(regions(polyshape(vertice1,'Simplify',1))); pgon2 = union(regions(polyshape(vertice2,'Simplify',1))); plot([...

plus de 2 ans il y a | 0

Réponse apportée
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...

plus de 2 ans il y a | 0

| A accepté

Réponse apportée
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),'...

plus de 2 ans il y a | 1

| A accepté

Réponse apportée
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...

plus de 2 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 2 ans il y a | 1

| A accepté

Réponse apportée
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...

plus de 2 ans il y a | 0

Réponse apportée
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...

plus de 2 ans il y a | 1

Réponse apportée
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...

plus de 2 ans il y a | 0

| A accepté

Réponse apportée
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

plus de 2 ans il y a | 0

Réponse apportée
Can you change 0^0=1 to 0^0=0 in Matlab?
No, you cannot.

plus de 2 ans il y a | 1

Réponse apportée
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) ...

plus de 2 ans il y a | 0

Réponse apportée
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...

plus de 2 ans il y a | 0

Réponse apportée
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...

plus de 2 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 2 ans il y a | 0

| A accepté

Réponse apportée
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 ...

plus de 2 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 2 ans il y a | 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...

plus de 2 ans il y a | 2 réponses | 2

2

réponses

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

plus de 2 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 2 ans il y a | 0

Réponse apportée
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(:)'

plus de 2 ans il y a | 3

Réponse apportée
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)

plus de 2 ans il y a | 1

Réponse apportée
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...

plus de 2 ans il y a | 0

| A accepté

Charger plus