Community Profile # Matt J

Last seen: Today Active since 2009

Professional Interests: medical image processing, optimization algorithms

#### Statistics

All
• • • • • • • • • • #### Content Feed

View by

Multiplying elements of a matrix and its transpose row-wise
result=A.'*A;

3 hours ago | 0

Program to calculate Distance between points and fixed point
Use pdist2 distances=pdist2([A;B;C],P)

3 hours ago | 0

| accepted

Solving quadratic optimization problem in Simulink and code generation - Different behavior in Matlab?
Well, the problem is what the warning message told you - the conditioning of the problem is poor needs and needs to be improved ...

3 hours ago | 0

classes with static (constant) properties
No, an object is not created with method 2. An easy way to verify that is with the following small test class. You can see that ...

3 hours ago | 0

calculating view angle out of an image
You have to calibrate the camera and get the 3x4 projection matrix, P, but once you do it should be quite easy: u=dot( normali...

3 hours ago | 0

How to create table from formula
A=(1:5).'; x=A; y=10*A; z=100*A; T=table(x,y,z)

4 hours ago | 0

Create circle that has random "noisy" points along circumference within 10% of circle radius
You can use this circularFit.xysim() from this FEX package https://www.mathworks.com/matlabcentral/fileexchange/87584-object-or...

14 hours ago | 0

Taking average over specified grid box resolution?

20 hours ago | 0

Build a vector of file names with formatting and leading zeros
FileNames = compose('myfile_%02d_%03d.txt', ... FileNameIntegersMatrix(:,1), FileNameIntegersMatrix(:,2) )

20 hours ago | 0

| accepted

Replace values ​​in a matrix
A=reshape(A,[],3); B=mean(A,1); map=A>50; A=reshape( A.*(~map)+B.*map , 1,[])

1 day ago | 0

| accepted

How to applied 2d gaussian function
You could try this alternative gaussian fitting routine, and see if you get different results: https://www.mathworks.com/matlab...

2 days ago | 0

Memory problem when accessing and copying the 3D array elements by subscripts
The better way would be to avoid using find(): region=(ximg > 0 & ximg <= xdim & yimg > 0 & yimg <= ydim); imtmp=reshape(ima...

3 days ago | 0

| accepted

How tor reshape an array
B=reshape(A.',3,[]).'

3 days ago | 0

| accepted

How to set a custom equation to fit 5 points in space by fitsurface?
Another way, which would allow you stay within the framework of the Curve Fitting Toolbox, would be to do a poly22 fit with uppe...

3 days ago | 0

| accepted

Is it possible remove a data point when the logical index removes a coordinate?
region=x1>0 & x1<925 & y1>0 & y1<925; scatter( x1(region),y1(region) )

3 days ago | 0

| accepted

Efficiently accesing cell entries
I have enclosed 2 mat files I see no attachments, so you probably forgot to click 'Submit'. In any case, your data organizatio...

3 days ago | 0

| accepted

Image quality and dimension
Well, I don't know if this is intentional, but every new image in the loop gets filtered by a different kernel because refback n...

3 days ago | 0

| accepted

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 ...

4 days ago | 0

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...

4 days ago | 0

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...

4 days ago | 0

| accepted

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

4 days ago | 0

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

4 days ago | 0

| accepted

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'

4 days ago | 1

| accepted

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...

4 days ago | 1

| accepted

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 days ago | 1

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

5 days ago | 0

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 days ago | 0