Answered
Boolean False when it should be True
dom(8,2) is only 8.3000 to 4 decimal places. You cannot see the differences beyond the 4th decimal unless you use >> format lon...

5 years ago | 0

Answered
how do i get MATLAB to extract a specific value in multidimension array or matrix
idx=CHIRPS_SPI3_SM<-1 & CHIRPS_SPI3_SM>-4; extractedValues=CHIRPS_SPI3_SM(idx);

5 years ago | 0

Question


Axis resizes inconsistently in a TiledChartLayout when you change its TileSpan
In the first example below, I obtain a TiledChartLayout in which all the plots have the same size (which is what I want). Why do...

5 years ago | 1 answer | 0

1

answer

Answered
set intervals with starts and ends in two arrays
Because it's homework, I've left some blanks for you to fill in. starts = [ 1 20 30 40]; ends = [3 22 34 41]; D=ends-starts...

5 years ago | 0

Answered
How do I check/verify that an array is a certain dimension?
while ~isequal(size(point),[1,2])

5 years ago | 0

| accepted

Answered
Counting Number of Voxels between 2 points without drawing lines
Assuming you have a binarized image and the curve is the only object in that image, [I,J]=find( bwmorph(yourImage,'endpoints'))...

5 years ago | 0

| accepted

Answered
How does the command: real(ifft(fftshift(Y))*N) operate?
All of those oeprations are O(N) except for the IFFT which is O(Nlog(N)). So the chain of operations is O(Nlog(N)) overall.It wo...

5 years ago | 0

| accepted

Answered
how can i remove objects that are on the edge of another object?
You can use imopen().

5 years ago | 0

Answered
How can concatenate matrices with dimension expansion.
permute( cat(3,img1,im2), [3,1,2]);

5 years ago | 0

Answered
Plotting a 3D mode shape by revolving 2D datapoints (in the r-z-plane) of an axisymmetric geometry around the z-axis
I can't follow most of what you posted, but if you just want to generate a surface/solid of revolution, you can use cylinder() ...

5 years ago | 1

Answered
making a 2d image from 3d shape
It seems like it would be better if you would just generate your spheres direclty as a 3D image volume. Then you could just use...

5 years ago | 0

| accepted

Answered
Zero points on graph
xIntercept1=roots(TL1); xintercept2=roots(TL2); yIntercept1=polyval(TL1,0); yIntercept2=polyval(TL2,0);

5 years ago | 0

| accepted

Answered
Extract objects from binary image
Something like this perhaps, BW=bwareafilt(~yourBinarizedImage,3); regions=regionprops(BW,'Image');

5 years ago | 0

Answered
Changing the same property of some axis children using subsasgn
I assume you know that subsasgn is called implicitly whenever you make an assignment statement, as in the following: [toHide.Vi...

5 years ago | 1

| accepted

Answered
Area of a implicit curve
Here is a very similar strategy based on alphaShape instead of polyshape. It is slower, but IMO handles the bounding rectangle a...

5 years ago | 2

Answered
Perimeter of a implicit curve
Perhaps as follows (see also this thread) plotRange=[-1,+1, -1,+1]*8; plotCorners=[-1 1;1 1;1 -1; -1 -1]*8; f=@(x,y) (sin(x...

5 years ago | 0

Answered
The determinant of a unitary matrix is 0
Matlab's det involves taking the product of long matrix diagonals. This can overflow or underflow very easily. The following mig...

5 years ago | 1

Answered
The determinant of a unitary matrix is 0
Determinant calculations for large matrices are numerically delicate (which is why they're often avoided). There are other/bett...

5 years ago | 0

Answered
display of curve information matlab
See Add Legend to Axis.

5 years ago | 0

| accepted

Answered
curve shifting on horizontal axis
For example, x=linspace(-pi,pi,1000); y=exp(x); plot(x(:)+(0:5)*10,y); axis([0,100,0,10]); legend

5 years ago | 0

| accepted

Answered
Area of a implicit curve
Perhaps as follows? plotRange=[-1,+1, -1,+1]*8; plotCorners=[-1 1;1 1;1 -1; -1 -1]*8; f=@(x,y) (sin(x).*sin(y)-0.5); fp=fi...

5 years ago | 2

| accepted

Answered
Matrix Dimension Must Agree
theta and l do indeed have different lengths, so it is not clear what you are trying to do in your calculation of Eteta. n = 37...

5 years ago | 0

Answered
How to find all the possible feasible solutions to a integer linear programme?
For R^20, yes. Just do an exhaustive search, [x{1:20}]=ndgrid([0,1]); x=reshape( cat(21,x{:}) ,[],20).'; feasible = x(:, al...

5 years ago | 0

| accepted

Answered
Optimization of Rosenbrock function
fun = @(x)100*(x(:,2) - x(:,1).^2).^2 + (1 - x(:,1)).^2 - 108.32; [x,fval]=lsqnonlin(fun,[0,0],[1,1])

5 years ago | 0

Answered
Basic question of convolution
But, when the equation is y[n] = x[n-1] * h[n+1], how can I make n-1 and n+1?? There is no need to in this case. because of the...

5 years ago | 1

| accepted

Answered
3D best fit curve from x,y and z data points
For the linear case, you can use linear3dFit from this FEX submission. As the others have said, however, we need to know the spe...

5 years ago | 0

| accepted

Answered
How to merge two table coulmns into one column?
T1=table([1;2;3],'VariableNames',{'X'}); T2=table([3;6;7],'VariableNames',{'X'}); x=str2double(string(T1.X)+string(T2.X))

5 years ago | 1

| accepted

Answered
Select image region using point coordinates
regions=regionprops(yourImage,'PixelList'); detector=@(s) ismember([x,y], s.PixelList,'rows'); find( arrayfun( detector , ...

5 years ago | 1

Answered
Determining internal coordinates of a rotated ellipsoid
Why is triangulation part of the strategy if you want actual points inside the ellipsoid? If you have the means to sample the su...

5 years ago | 0

| accepted

Answered
Quadprog solver stalled, constraints satisfied.
Well, because in the first case you are using a non-default ConstraintTolerance, of course. That changes the conditions when the...

5 years ago | 0

| accepted

Load more