Answered
Is there any alternate to fitgeotransform as i dont have imagetoolbox
There is this file, which I haven't used, but which seems to have at least 1 happy customer, https://www.mathworks.com/matlabce...

6 years ago | 0

| accepted

Answered
Sphere command to create a unit sphere, enlarge its radius to 6 and move its centre to (−1, 1, 0).
[x,y,z] = sphere; [x,y,z]=deal(6*x-1,6*y+1,6*z); surf(x,y,z)

6 years ago | 0

Answered
Odd/even number constraint in linear programming
Make a change of variables of the form x1=2*y1, where y1 is also an integer-constrained variable.

6 years ago | 0

Answered
How to get average of interval from matrix
conv(data,[1,1,1,1]/4,'valid') or movmean(data,4,'Endpoints','discard')

6 years ago | 0

| accepted

Answered
Failure in initial objective function evaluation. FMINCON cannot continue.
You have 17 unknowns but the initial guess that you passed to fmincon is a scalar.

6 years ago | 0

| accepted

Answered
Struct contents reference from a non-struct array object
I think you just have to get rid of the extra whitespace between . and *

6 years ago | 0

Answered
MATLAB function adds two nonnegative integers where x has at least as many digits as y
Hint: You can convert from vector form to a single number as follows x=[1 2 3 4 5]; xx=x*10.^(4:-1:0).'

6 years ago | 0

Answered
How to sum every 30 columns?
You can use sepblockfun https://www.mathworks.com/matlabcentral/fileexchange/48089-separable-block-wise-operations sepblockfun...

6 years ago | 0

Answered
Rotation of Z Axis
You could use this, https://www.mathworks.com/matlabcentral/fileexchange/30864-3d-rotation-about-shifted-axis

6 years ago | 0

Answered
Insert elements to cell array
g=[ repmat({M},5,1) , g]

6 years ago | 0

Answered
Can I shift the position of a tile in tiledlayout to be skewed?
I think that such a layout violates the definition of "tiled" and therefore will not be possible with tiledlayout, however this ...

6 years ago | 0

| accepted

Answered
Find a square in an image and give back it's location and color in the image
Instead of detecting squares as the first step, couldn't you just detect red, yellow, or blue pixel regions? I see some small bl...

6 years ago | 0

Answered
min and max of gpuArray
I cannot find any caveat about GPU support of min/max on the documentation. Check the "Extended Capabilities" section of doc mi...

6 years ago | 1

| accepted

Answered
Should Implicit Expansion be Applied to Additional Functions?
I wouldn't mind seeing it extended to the colon operator, instead of having to do things like this, a=2; b=[5,7,9]; c=array...

6 years ago | 1

Answered
element by element division of two matrices not producing expected result
I suspect you are simply being confused because Matlab is displaying everything in 4-decimal scientific notation, such as in the...

6 years ago | 0

| accepted

Answered
Curve fit such as f(x) = A + B/x^2
p=((1./x(:)).^[0,2]) \ y(:); A=p(1); B=p(2);

6 years ago | 0

Answered
Curve fit such as f(x) = A + B/x^2
p=polyfit(1./x.^2,y,1); B=p(1); A=p(2);

6 years ago | 0

Answered
How to equate number of element in array to plot graph?
For example, numel(c21) will give the number fo elements in c21.

6 years ago | 0

Answered
Looping the column elements of the Matrix
data=(randi(3,10,4)); %artificial data example [G,ID]=findgroups(data(:,1)); Means=splitapply(@(a,b) mean(b(a==min(a))...

6 years ago | 0

Answered
How to change negative values in anonymous function to zero and call it to next function?
v =@ (z) z.^3 .*(z>=0);

6 years ago | 0

| accepted

Answered
Process an area by trapezoid shape in image processing
It is a simple morphological operation to generate a binary mask for the trapezoid's interior. You can use that to eliminate fa...

6 years ago | 0

Answered
Code running multiple times for different elements of a matrix
m=conv2(ret,ones(120,1)/120,'valid')

6 years ago | 0

| accepted

Answered
Error using GA to optimize an Objective function
X=ga( @(X)objfun(X,h,Tfinal) , 1,[],[],[],[],xmin,xmax,[],options);

6 years ago | 0

| accepted

Answered
how to find out if a number is even or not
One more way to test even-ness in a scalar, s, isEven=false; try, validateattributes(s,"numeric","even"); isEven=true; end,

6 years ago | 0

Answered
Inequality Indexing using Optimization Toolbox
What Abdolkarim is getting it is the following, I believe. It requires known upper bounds U (vector or scalar) and lower bounds ...

6 years ago | 2

| accepted

Answered
How can I solve a function for x given y?
x=fzero(@(x) f(x)-y, 0.5 )

6 years ago | 0

| accepted

Answered
regionpros gives 0 area for a simple binary figure?
Your bwnew needs to be of type logical, otherwise it gets treated as a label image. >> T = regionprops('table',logical(bwnew),'...

6 years ago | 0

| accepted

Answered
Warning: Derivative finite-differencing step was artificially reduced to be within bound constraints. This may adversely affect convergence. Increasing distance between bound constraints, in dimension 3, to be at least 2e-08 may improve results.
Well, there are technical issues with applying optimization toolbox solvers to ODEs. You will want to be thoroughly familiar wit...

6 years ago | 1

| accepted

Answered
how to get matrix from double array ?
a1=[0,0]; a2=[0,6]; a3=[4.5,2.5]; a4=[6,4]; %מטריצה שמחברת 2 נקודות שמייצגות את המוטות Place=[ a1 a2 a1 a3 ...

6 years ago | 0

Answered
Can I use boolean of a variable on a column of another variable
Resp=response(target==2,:);

6 years ago | 0

| accepted

Load more