Answered
fitting straight line to part of data and extrapolate to x-axis at y = zero
region=(y<0.01); p=polyfit( x(region),y(region) ,1); xroot= roots(p) % the extrapolated root

5 years ago | 1

Answered
Why can I not open task in live script?
I don't know for sure if this applies to you, but I experienced similar errors due to some modifications to default groot settin...

5 years ago | 1

Question


ConvNets and sliding windows
(Rephrased) I am starting to play with the Deep Learning Toolbox and deepNetworkDesigner. An example of what I'd like to be abl...

5 years ago | 1 answer | 1

1

answer

Question


appdesigner does not save to current folder
I have composed a blank app in appdesigner and added a button to it. Then, I try to save it. When I do, the resulting .mlapp fil...

5 years ago | 1 answer | 0

1

answer

Answered
Dividing elements of matrices where the matrices are in a cell array
What you've shown should work, but since the cell array contents are identical, it would be faster to do, scale=rundata; scale...

5 years ago | 0

| accepted

Answered
Access specific indexing values for 3D array
Why not do, A(index,1,:)

5 years ago | 1

| accepted

Answered
generating and plotting a matrix of bsplines with different positions and width
See Example1D.m in https://www.mathworks.com/matlabcentral/fileexchange/26292-regular-control-point-interpolation-matrix-with-...

5 years ago | 0

Answered
How to resolve this error "Unrecognize function or variable" when using fsolve
We need to see the full error message copy/pasted, but you may have put the myfun() script in a location where Matlab cannot see...

5 years ago | 0

Answered
Calculating divisions in matrices
I don't quite understand how you sequence the combinations, but it will be something like the following: Acell={Ai,Aj,Ak, Al}; ...

5 years ago | 1

| accepted

Answered
How to obtain a graph?
I've already checked other function such as "subgraph", but I was not able to manage it. That should have worked, neighb=[pr...

5 years ago | 1

| accepted

Answered
Operator '-' is not supported for operands of type 'string'. Matlab
Presumably it is because T contains strings, not numbers.

5 years ago | 0

Answered
Kronecker Tensor Product for very large matrices
You need the matrices generated by diag() in sparse form, too. Use spdiags() instead, e.g., nx = 3;ny =3; dx=1; ...

5 years ago | 0

| accepted

Answered
Applying method to one object in array affects values of another
It is a curious pitfall you've stumbled on. Basically, the solution is to avoid using default empty elements to fill up a MixerA...

5 years ago | 0

| accepted

Answered
Cylinder recognition in a matrix
If you extract the (x,y,z) coordinates that you think might conform to a cylinder you can fit them with cylindricalFit() in this...

5 years ago | 0

Answered
curve fitting a custom equation
You don't need a custom type. Your model is just exp2 but with modified data (x,y-x)

5 years ago | 1

Answered
How to detect point before a positive ramp
Using this File Exchange submission https://www.mathworks.com/matlabcentral/fileexchange/78008-tools-for-processing-consecutive...

5 years ago | 0

Answered
How to resolve Error using reshape function?
tm= ceil(0.25*length (x)); %or floor?

5 years ago | 1

| accepted

Answered
How to count alternating ones and zeros in a matrix
v =[ 0 0 0 0 0 0 1 1 0 1 1 0 1 0 1 0 1 0 0 ...

5 years ago | 3

Answered
"Properly vectorize your function"-warning. fcontour & mvnpdf
F = @(x,y) reshape( mvnpdf([x(:),y(:)]) , size(x));

5 years ago | 1

| accepted

Question


string data type is not a class?
I would expect the following to pull up a list of methods for the string data type, but it does not: methods("1") Is there any...

5 years ago | 1 answer | 0

1

answer

Answered
How to find the maximum point of correlation in matlab for two similar images..
https://www.mathworks.com/matlabcentral/answers/877913-finding-the-point-which-has-the-maximum-correlation-of-two-images?s_tid=s...

5 years ago | 0

| accepted

Answered
Round the elements column of the matrix to the same digit than it is in the other column
One way, Result(:,5) = round(Result(:,5),2,'significant'); numDigits=strlength(extractAfter(string(Result(:,5)),'.')); numDig...

5 years ago | 0

| accepted

Answered
Finding the point which has the maximum correlation of two images
One way, [i,j]=find(image==max(image(:)));

5 years ago | 1

Answered
OUT OF MEMORY PROBLEM
I have the vague impression that you are trying to compute a projection matrix for the purpose of tomographic forward and back p...

5 years ago | 0

Answered
fmincon stopped because the size of the current step is less than the value of the step size tolerance and constraints are satisfied to within the value of the constraint tol
Your objective and nonlinear constraint function is stochastic due to this line, G = sqrt(0.5)*(randn(M,K)+1i*randn(M,K)); If...

5 years ago | 0

| accepted

Answered
Mean of 1st and 2nd, 3rd and 4th, 5th and 6th elements and so on
mean(reshape(yourMatrix,2,[]))

5 years ago | 1

| accepted

Answered
Slow/Non-Convergence for Large Nonlinear Programming Problem -- Better Way to Solve/Formulate?
Before running out of memory, I am able to run fmincon() for approximately 20000 iterations. It is concerning that you are runn...

5 years ago | 0

Answered
grouping like items in column
One way: a=sortrows(a,1)

5 years ago | 0

| accepted

Answered
Default dimension of one-dimensional array of objects
The result of [objArray.propertyOne] will always be a row vector independent of the shape of objArray, so I don't think having t...

5 years ago | 1

| accepted

Answered
average for each year
In recent Matlab, mean(SSTmonth,[1,2]) In older Matlab, mean(reshape(SSTmonth,[],15),1)

5 years ago | 0

| accepted

Load more