Answered
Using accumarray to sum all values associated with a given node
One way: edges = [1 2; 2 3; 3 1; 2 4; 4 5; 4 1]; data=[0.276 0.679 0.655 0.162 0.118 0.333]; G=graph(edges(:,1), edg...

2 years ago | 0

| accepted

Answered
How do I plot one curve top on the other in the same figure?
Use subplot or tiledlayout. H(1)=openfig('fluence noneuqib.fig'); ax1=gca; H(2)=openfig('fluence ttm new.fig'); ax2=gca; ...

2 years ago | 0

| accepted

Answered
how to change zero in series number
y=[0 2 3 5 1 6 0 0 3 4 7 2 0 6 2 ] y(y==0)=nan; out=fillmissing(y,'next')

2 years ago | 1

| accepted

Answered
What is the difference between the 1st order polynomial fit and linear regression?
They are the same. You are just plotting the polyfit result incorrectly, load xy_ask.mat x y clf; plot(x,y,'o'); hold on x0=0...

2 years ago | 3

| accepted

Answered
Determine intersection between plane and polyhedron
Use intersectionHull() from this FEX download, https://www.mathworks.com/matlabcentral/fileexchange/30892-analyze-n-dimensional...

2 years ago | 0

Answered
how to calculate tangent between circle and polynomial (from curve fit)
The equation for the tangent to the polynomial is y=m(x1,y1)*x+b(x1,y1) where m(x1,y1) and b(x1,y1) are a function of the tange...

2 years ago | 0

| accepted

Answered
How to solve Ax=b with some all knowns except some x values
A = [48 -24 -24 12]; b = [0 0]; solution = A(:,2:end)\(b-A(:,1))

2 years ago | 0

Answered
implicit conversion doesn't work with some functions
interp1 is not a method of class double, so it does not have to accommodate double's child classes. ismember('interp1',methods(...

2 years ago | 1

| accepted

Answered
fsolve not varying input variable
I can't say definitively whether this is responsible for the specific problem you cite, but you are not being at all careful in ...

2 years ago | 0

Answered
Reducing resolution imagesc by convolution
You could download sepblockfun from the File Exchange, https://www.mathworks.com/matlabcentral/fileexchange/48089-separable-blo...

2 years ago | 1

| accepted

Answered
Unrecognized function or variable 'importNetworkFromTensorFlow'.
You haven't filled in the form with your Matlab release, but I'm guessing you have a version that predates that command.

2 years ago | 0

Answered
creating nodes on an axis normal to a plane
You can generate equidistant points along any 3D ray as follows: center = [-24.3053980118084 -192.105601596377 -203.31723850625...

2 years ago | 2

Answered
Using function handle in fittype function
No, there isn't. fit and fittype need to know the number and names of the unknown coefficients, and the only way they can do tha...

2 years ago | 0

| accepted

Answered
How to get the ODD with fanbeam function
I suspect ODD is always zero. It should be easy to test. Use the known width of the phantom and the known FanSensorSpacing to se...

2 years ago | 0

Answered
how parfor distributes resources to each iteration if the number of cores is larger than the number of iterations
You have to consider the number of workers, M, not just the number of cores, C. If M is the number of parpool workers and N is ...

2 years ago | 1

Answered
Fitting an ellipse based 3D PointCloud on 3D space
Using this fitting toolbox (you must download it), https://www.mathworks.com/matlabcentral/fileexchange/87584-object-oriented-t...

2 years ago | 2

| accepted

Answered
Find coordinates inside a matrix with specific conditions
Using this FEX download, https://www.mathworks.com/matlabcentral/fileexchange/87584-object-oriented-tools-for-fitting-conics-an...

2 years ago | 0

| accepted

Answered
Improving the interpolation of nodes arranged in a circle on a plane
You could fit a circle to the given points and then resample it using this FEX download, https://www.mathworks.com/matlabcentra...

2 years ago | 0

| accepted

Answered
Fast calculate the inverse of a lower triangular matrix
Do you really need the inverse of the matrix or do you need to solve a system of equations whose coefficient matrix is that lowe...

2 years ago | 0

Answered
sum results depending on array orientation
Now the inconsistent results is considered by TMW as a bug Here is what they said, After some investigation, I found out that ...

2 years ago | 1

Answered
matlab strange result for mean of single vs double
I reported the alternative example below to Tech Support and their reply was that they do in fact consider it a bug. I'm not sur...

2 years ago | 1

Answered
Get the last 4 digit number out of a string?
With more recent Matlab, str = "SomeName_1234_ABC_5678_1"; s=extract(str,"_"+digitsPattern(4)+"_"); last=erase(s{end},"_"...

2 years ago | 2

| accepted

Answered
How to subtract two column vectors properly?
The relative error is the only thing you can expect to be small, which it is: DEsol = norm(unew-u)/norm(u) %relative error I...

2 years ago | 0

Answered
How to have legend in multiple rows and center aligned?
The second output of legendflex, https://www.mathworks.com/matlabcentral/fileexchange/31092-legendflex-m-a-more-flexible-custo...

2 years ago | 0

Answered
changing expression to function and then optimize the function
Do not use syms or matlabFunction for a situation like this. Just write a plain function to compute the expression, function ex...

2 years ago | 0

Answered
Create a 4D array from 3D array with 3 columns, and 1D (row only) array with 3 columns
How do I create a 4D variable that has data from arr1 and arr2, and looks like what I wrote in the beginning? My guess is its si...

2 years ago | 0

| accepted

Answered
How to plot a polytope in MATLAB using a given matrix ?
You can obtain the linear equalities for the polytope using vert2lcon, https://www.mathworks.com/matlabcentral/fileexchange/308...

2 years ago | 0

Answered
Does DeepNetworkDesigner support Transformer Layers?
If the transformer layer is a custom layer that you have created for yourself, you would import it to deepNetworkDesigner from t...

2 years ago | 0

Answered
Probolem when using fmincon :The solver starts from a feasible point but converges to an infeasible point
You seem to be under the impression that if the initial point x0 is feasible, then all future iterations will be feasible. There...

2 years ago | 1

Answered
An equivalent function to "imregionalmax" with higher speed
If you can count on the "peaks" to be a single pixel in size, you can just do, ispeak=A>=imdilate(A,ones(3)); %A is the image

2 years ago | 1

| accepted

Load more