Answered
What happens to image labels when I resize the image? Are labels also resized?
If you are doing object classification, the labels are not images (they might be numeric scalars or string labels) so it is not ...

5 years ago | 0

Answered
ismember has different length depending on argument order
Wouldn't it just be, mask = ismember(array2(:,1), array1) & ismember(array2(:,2), array3); fn=@(z) z(mask,:); array1=fn(a...

5 years ago | 0

Answered
files managing (copy, move and write)
You can use copyfile and movefile. https://www.mathworks.com/help/matlab/ref/movefile.html https://www.mathworks.com/help/matl...

5 years ago | 0

| accepted

Answered
Any way how to go around the memory issue?
Will the matrices be sparse? If so, use sparse() to build them.

5 years ago | 0

Answered
How can I retrieve the coordinates of polygon vertices in a matrix?
Just do roi.Position

5 years ago | 0

| accepted

Answered
How to generate a binary matrix with unique rows (or) columns?
Something like this, perhaps? n = 15; k = 10; dec2bin( randperm(2^n,k) ) -'0'

5 years ago | 1

| accepted

Answered
How to do exponential curve fitting like y=a*exp(-b/x)
If you make the change of variables u=log(y), c=log(a) and v=1/x, then your exponential equation becomes u=c-b*v which is linear...

5 years ago | 1

| accepted

Answered
Normalization of matrix column
In recent Matlab, A= [ 1 2 3 4 3 4 5 6 4 5 6 7 ]; A=normalize(A,1,'range')

5 years ago | 1

Answered
Normalization of matrix column
a=min(A,[],1); b=max(A,[],1); A=(A-a)./(b-a);

5 years ago | 0

Answered
How can I separate objects in a Binary Image?
What if you use regionprops to find the minor axis of the ellipse-shaped blobs and split them along that axis?

5 years ago | 0

Answered
fsolve stopped because the problem appears regular
If you are going to solve for x(i) that are expected to be on the order of 1e15, you need to adjust all of fsolve's tolerance pa...

5 years ago | 1

Answered
fit function not iterating
You should adjust your units for both the x,y data and for the parameters so that the datay are not so uniformly close to 0 and ...

5 years ago | 0

Answered
How to fit a smooth curve to data in 3D?
Perhaps with csaps(). There, you have parameters that directly control the level of smoothing.

5 years ago | 0

Answered
How to plot three X & Y sets of points on the one graph from a text file
plot( Ifile(:,[2,4,6]) , Ifile(:,[3,5,7]) )

5 years ago | 0

Answered
How can I separate a sorted array into multiple at points referenced by another array?
This might be what you want: A = [1 4 7 9]; B = [1 2 3 4 5 6 7 8 9 10 11 12 13]; G=discretize(B,[A,inf]); C=splitapply(@...

5 years ago | 0

| accepted

Answered
How can one reshape this table?
Perhaps as follows? load tst T [Gage,IDage]=findgroups(T(:,1)); [Gdate,IDdate]=findgroups(T(:,2)); Tnew=[ IDdate, a...

5 years ago | 0

| accepted

Answered
Getting different results from function handle & syms for a same equation. How to avoid it?
The results are different because the polynomial coefficients are different: >> sym2poly(P)-coeffs' ans = 1.0e-04 * ...

5 years ago | 0

Answered
How to "quicksave" a file in app designer?
The 3rd argument to uiputfile should end with a path separation character: [file,path] = uiputfile(".mat","Save AnimTronics Sys...

5 years ago | 0

Answered
how convert the vector to matrix ? unknown number of columns
No, the solution is ill-defined. Another result with the same number of rows is: A=[1 2 3 4 5 6 7 8 9]

5 years ago | 0

Answered
Applying vectorization techniques to speedup the performance of dividing a 3D matrix by a 2D matrix
Another idea. clc; clear all; % Test Data % I'm trying to remove the for loop for j in the code below N = 10; M = 10; Nx...

5 years ago | 1

Answered
Applying vectorization techniques to speedup the performance of dividing a 3D matrix by a 2D matrix
On the GPU (i.e. if A and b are gpuArrays), the for-loop can be removed: Uhat = permute( pagefun(@mldivide,A,reshape(b,[],1,Nx)...

5 years ago | 0

Answered
Finding the vertical offset of a gaussian fit
This File Exchange routine does gaussian+constant fitting: https://www.mathworks.com/matlabcentral/fileexchange/69116-gaussfitn...

5 years ago | 1

| accepted

Answered
How to set a custom equation to fit 5 points in space by fitsurface?
I can't find "fitsurface" in the Mathworks documentation, but the fit is easy enough to do algebraically. x=x(:); y=y(:); z=z(:...

5 years ago | 0

Answered
Why is x(:) so much slower than reshape(x,N,1) with complex arrays?
The following simple test seems to support @Bruno Luong's conjecture that (:) results in data copying. The data of B1 resulting ...

5 years ago | 4

| accepted

Answered
Is it possible to correctly perform a multi-dimensional FFT on a 1D linearised version of a 3D array?
Reshaping to and from 3D format should not add significant cost: Nx = 256; Ny = 256; Nz = 128; N = Nx*Ny*Nz; A0 = rand(N,1)...

5 years ago | 0

| accepted

Question


Why is x(:) so much slower than reshape(x,N,1) with complex arrays?
The two for loops below differ only in the flattening operation used to obtain A_1D . Why is the run time so much worse with A_3...

5 years ago | 3 answers | 7

3

answers

Answered
see the 3d image and see the coordinates while moving the mouse over the image
You can use imshow() to display any particular slice of the image and then use the axis datatip button to get the in-slice 2D co...

5 years ago | 0

Answered
How do i find the coordinates of a boundary
How about simply, [m,n]=size(Image); I=boundary(:,1); J=boundary(:,2); corner1 = [1, max(J(I==1))]; %row/column coordinat...

5 years ago | 0

Answered
How to Draw an ellipsoid between two 3d coordinates
Another way would be to use the ellipsoidalFit.groundTruth method in this File Exchange submission. https://www.mathworks.com/m...

5 years ago | 0

Load more