Answered
Need a help with a code to check if a circle in a image is closed or not
I would just use imfill(__,'holes'). If there are any breaks in the boundaries, it will fail to fill the circle.

2 years ago | 0

Answered
fmincon does not respect MaxIter
Now you see that from iteration 26 the solution is really good with 4-5 digits of accuracy, so whay TolX=0.01 fails? Remember ...

2 years ago | 0

| accepted

Answered
Interpolation using for loop
You don't need a for-loop to interpolate successive temp(i,:). Just do, T = interp1(z_sensor, temp', z_mesh ,'linear');

2 years ago | 0

| accepted

Answered
I have a problem with the convergence of fsolve ?
Because you only have 3 unknowns, you could you could do a grid search for the solution(s). Or use contour3 to find the zero lev...

2 years ago | 0

Answered
I have a problem with the convergence of fsolve ?
Your equations look like polynomials of rather large degree, at least 8. The solutions of high order polynomials are known to be...

2 years ago | 1

| accepted

Answered
Sharing large structure with nested functions with function handles increase main function overhead?
where I edit the model states It is the editing of the variable contents that incurs time, not the passing of them to functions...

2 years ago | 0

| accepted

Answered
difference between movmean and movavg
To name just a few differences, movavg requires the Financial Toolbox while movmean does not movavg can process Financial Tool...

2 years ago | 0

Answered
Dsolve gives extra term
syms y(x) eqn = diff(y,x,3)+81*diff(y,x) == 3*x+8; ytemp(x) = dsolve(eqn); ysol(x)=dsolve(diff(y,x)==diff(ytemp,x))

2 years ago | 1

| accepted

Answered
How to obtain information from a ROI from an image generated with imagesc
Use the ROI's createMask() method: max(yourImage(roi.createMask))

2 years ago | 0

| accepted

Question


Programmatically modify the hyperparameters of a deep network layerGraph
I have an un-initialized layerGraph object for a CNN. I wish to modify all of the convolutional layers in the CNN so that the Nu...

2 years ago | 1 answer | 1

1

answer

Answered
fill the entry of a vector with a given distance
M = 10; d = 2; I=1:d+1:M-d; J=1:nnz(I); A = accumarray([I(:),J(:)],1,[M,numel(J)])

2 years ago | 2

| accepted

Answered
How to store extracted coefficient values from curve fitting of multiple .txt files in index arrays?
f = fittype( 'C1+C4*(C5^2/(C5^2+(x-C6)^2))+C7*(C5*(x-C6)/(C5^2+(x-C6)^2))+C8*x'); C=nan(5,numFiles); %pre-allocate for i=...

2 years ago | 0

| accepted

Answered
Understanding the working mechanism of contourc
The documentation doesn't disclose it, but I would guess that it does a kind of 2D bisection algorithm. Sample points are chosen...

2 years ago | 0

Answered
Mathematical execution of contourc
The documentation doesn't disclose it, but I would guess that it does a kind of 2D bisection algorithm. Sample points are chosen...

2 years ago | 0

Answered
Calculating the circulation given specific parameters
Perhaps this is what you meant. The expression for c looks like it's supposed to be Gaussian, and the double for-loop suggests t...

2 years ago | 1

| accepted

Answered
Why are complex values obtained for the below function (x) in the if condition?
Because you are raising a negative number to a fractional power, e.g., (-2)^1.5

2 years ago | 0

| accepted

Answered
How do I determine the corresponding weights and biases for each feature
As an example, load net net.Layers(2).Weights net.Layers(2).Bias

2 years ago | 0

| accepted

Answered
How to find the neighbors of a 150x150 matrix?
You can use bwboundaries.

2 years ago | 0

Answered
Cannot perform null assignment from variable
Another workaround is to call subsasgn direclty, A = nan(1,3); empty_scalar = 4; A=subsasgn(A, struct('type','()','subs',{...

2 years ago | 0

Answered
Cannot perform null assignment from variable
Yes, it is special syntax. I agree it is strange behavior, but one workaround is, A = nan(1,1,3); empty_scalar = []; if isemp...

2 years ago | 2

| accepted

Answered
Using zoom with rectangle cuts of area
Don't use zoom. Use XLim and YLim to control the viewable region. That will let you set its boundaries exactly as you like them....

2 years ago | 0

Answered
increase the thickness + hide some lines generated in the pie chart
What I would do is overlay another piechart on top of it (with transparent wedges, but thicker lines). load matrix_new.mat loa...

2 years ago | 0

| accepted

Answered
How can I fill the area under a curve with different colors?
One way: x=0:0.01:4; y=1-exp(-x); color={'g','y','r'}; edges=0:4; for i=1:3 r=(edges(i)<=x)&(x<=edges(i+1)); ...

2 years ago | 0

Answered
curve fitting exponential function with two terms
You can also use fit()'s normalizer, x = [6500 6350 6000 5400 4500]; y = [0 0.25 0.5 0.75 1.0]; theFit=fit(x',y','exp2','N...

2 years ago | 0

Answered
curve fitting exponential function with two terms
You should normalize your x data % Curve Fit x = [6500 6350 6000 5400 4500]; x=(x-mean(x))/std(x); y = [0 0.2...

2 years ago | 0

Answered
Matlab curve fitter error with exponential form with 2 terms
% Interior Square Footage x = [1500 1600 1750 1930 2250]; y = [0 0.25 0.5 0.75 1]; theFit=fit(x' , y', 'exp2','Lower',[0 0 ...

2 years ago | 0

| accepted

Answered
How to fit an ellipse to an image in matlab.
You can use ellipticalFit from this FEX download https://www.mathworks.com/matlabcentral/fileexchange/87584-object-oriented-too...

2 years ago | 0

Answered
Copy a file to a parent folder
Is there a way to fun a script from inside the subfolder to copy the file up one level? Yes, but I wonder why you think the scr...

2 years ago | 0

Answered
combination of two matrcies
S=log(kron(exp(4*L), exp(M)))

2 years ago | 1

| accepted

Load more