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

plus de 2 ans il y a | 2

| A accepté

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

plus de 2 ans il y a | 0

| A accepté

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

plus de 2 ans il y a | 0

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

plus de 2 ans il y a | 0

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

plus de 2 ans il y a | 1

| A accepté

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

plus de 2 ans il y a | 0

| A accepté

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

plus de 2 ans il y a | 0

| A accepté

Réponse apportée
How to find the neighbors of a 150x150 matrix?
You can use bwboundaries.

plus de 2 ans il y a | 0

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

plus de 2 ans il y a | 0

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

plus de 2 ans il y a | 2

| A accepté

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

plus de 2 ans il y a | 0

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

plus de 2 ans il y a | 0

| A accepté

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

plus de 2 ans il y a | 0

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

plus de 2 ans il y a | 0

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

plus de 2 ans il y a | 0

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

plus de 2 ans il y a | 0

| A accepté

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

plus de 2 ans il y a | 0

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

plus de 2 ans il y a | 0

Réponse apportée
combination of two matrcies
S=log(kron(exp(4*L), exp(M)))

plus de 2 ans il y a | 1

| A accepté

Réponse apportée
How do you build the matrix for finite difference 2D Laplace equation
Using func2mat from this download, https://www.mathworks.com/matlabcentral/fileexchange/44669-convert-linear-functions-to-matri...

plus de 2 ans il y a | 0

Réponse apportée
Brace Indexing Not Supported when in matlab app designer but when transferred to matlab script, it works properly.
I also tried to use msgbox() just to see what is stored in app.StudentName. Why use msgbox()? Why not just pause execution and ...

presque 3 ans il y a | 0

Réponse apportée
How to optimise a specific equation in a model in order to fit the final curve of the model?
Yes, there is polyfit.

presque 3 ans il y a | 0

Réponse apportée
Computing on multiple notes with multiple cores
The problem is, that the outer loop has 10 repetitions and the inner loop 50 repetitions Combine the loops into one, i.e., inst...

presque 3 ans il y a | 1

| A accepté

Réponse apportée
Implicit expansion for griddedInterpolant
Use the grid vector syntax of griddedInterpolant: zq=J({xq,yq})

presque 3 ans il y a | 1

| A accepté

Réponse apportée
Applying an affine transformation of one image to another image
Use imregtform to do the registration instead. Then use imwarp to apply the transformation that imregtform gives you.

presque 3 ans il y a | 1

| A accepté

Réponse apportée
Using Optimizing Nonlinear Functions to find mutiple variations
There are also FEX downloads that can do gauss fitting for you, e.g., https://www.mathworks.com/matlabcentral/fileexchange/6911...

presque 3 ans il y a | 0

Réponse apportée
How to find the position index of vector array
start=find(A(1,:),1,'first'); stop=find(A(1,:),1,'last');

presque 3 ans il y a | 0

| A accepté

Réponse apportée
Plotting Ellipsoids on XYZ graphs.
You can plot an arbitrarily oriented ellipsoid using this FEX download https://www.mathworks.com/matlabcentral/fileexchange/875...

presque 3 ans il y a | 1

Réponse apportée
Issue with gradient of interpolated data
Here are some applicable FEX submissions (which I myself have not used), https://www.mathworks.com/matlabcentral/fileexchange/8...

presque 3 ans il y a | 0

Réponse apportée
Elegantly refer to the second output from a function
data = (1:8)*100 result = data( argEval(2,@ismember,1, [0,1,2,3,4,5])) function out=argEval(n,fh, varargin) %Get the n-th...

presque 3 ans il y a | 2

Charger plus