Submitted


Further tools for analyzing objects in N-dimensional images
A collection of tools to supplement bwpropfilt, bwareaopen, and the like.

13 days ago | 9 downloads |

Answered
Why can't I put the 1x3 matrix into 1x3 variable?
Because a, b, and c do not exist yet, Matlab can't know what their eventual sizes are supposed to be. Suppose you had done this ...

14 days ago | 1

Answered
How to Arrange NDGRID and CELL data to become more compact in size and use less memory?
Shouldn't it be, [a,b,c,d,e]=ndgrid(PV,Batt,MPPT,Inverter,DieselGenerator); ExpandedData=[a(:),b(:),c(:),d(:),e(:)];

14 days ago | 1

Answered
Find random samples of some rows in the matrix and ensure the rank
What does it mean to "ensure the rank"? Do you mean you want to find a random full-rank subset of rows? If so, A = [ 1.2285 ...

14 days ago | 0

| accepted

Answered
Calculate distance between 2 points using array
vecnorm( diff(data,1,2) , 2, 1)

14 days ago | 1

| accepted

Question


Move the editor toolbar buttons to the right hand side
In the Matlab Editor, the toolbar buttons are on the left-hand side of the toolbar. I would like to move them to the right-hand ...

15 days ago | 0 answers | 0

0

answers

Question


Adding titles squashes one of my images in a TiledChartLayout (R2020a)
I have a TiledChartLayout of 6 images that initially looks like this: Then, however, I ...

15 days ago | 1 answer | 0

1

answer

Answered
Add new double array within cell for each iteration in a for loop
hourValues=cell(1,3); for i=1:3 hourValues{i} = some code; end

15 days ago | 0

| accepted

Answered
Delete row with same value but in different columns
For example, to delete the first row, A=[1 1 2 1 47 ; 1 1 47 1 2] A(1,:)=[]

15 days ago | 0

| accepted

Answered
How to add variable fields in struct?
structExampe.(field(n)).c=c;

15 days ago | 0

| accepted

Answered
Obtaining correct frequency and normalisation using convolution function
It's usually a good idea to do things in a certain order. First, plan the sampling axes both for time and frequency. Note that b...

15 days ago | 1

| accepted

Answered
Selection of Proper Optimization Function for Finding Global Minimum
If r is the only unknown, then your objective is convex. Assuming your constraints are also convex, any solution will be a globa...

16 days ago | 0

| accepted

Answered
Cosine of an angle
As far as I can see, only by changing the equations: E4 = (Sk(1)-(r)*cos(l2)*sin(m2))== Sk(1)-unit_vi(1)*d2; E5 = (Sk(2)-(r)*s...

16 days ago | 0

Answered
for looop convert to arrayfun
The way to do this with arrayfun, (which I don't think will be optimal here) would be, [I,J]=ndgrid(gpuArray(1:nElec)); fun=...

16 days ago | 0

| accepted

Answered
for looop convert to arrayfun
The more efficient way to do what you are attempting is with the 2 lines of code, X=X(:); Y=Y(:); Z=Z(:); EF = 1 - ( (X-X.'...

16 days ago | 1

Answered
How to obtain specific located objects in binary image ?
With bwselect().

16 days ago | 0

Answered
How to create a vector with elemts being the outputs of a function
One way, fun=@(x) floris(wind_speed,density,wind_direction,... turbine_centre,yaw_angle,diameter,powercurve,[x 0 0.3]...

16 days ago | 0

Answered
Why the FFT of the conjugate doesn't coincide exactly at the negative frequency of interest?
Because the frequency origin shouldn't change positions when you do a frequency reversal. But with an even length array N, the f...

16 days ago | 0

| accepted

Answered
How to connect specified x,y coordinate points in image?
To connect the points you can use the drawpolygon() command, feeding it the known vertices of the 3 points: drawpolygon('Positi...

16 days ago | 0

| accepted

Answered
Image Restoration (shifted lines)
Once you have found the shifts using xcorr2, you can use imtranslate() to unshift the image.

16 days ago | 0

Answered
How to connect multiple points in order using the shortest line
X = [-0.5305 -2.0960 -1.6192 -2.2768 -1.9141 -2.0279 -2.0102 -2.0087 -2.0083 -2.0083 -2.0083]; Y = [3.466...

16 days ago | 0

| accepted

Answered
How to connect multiple points in order using the shortest line
X = [-0.5305 -2.0960 -1.6192 -2.2768 -1.9141 -2.0279 -2.0102 -2.0087 -2.0083 -2.0083 -2.0083]; Y = [3.466...

16 days ago | 0

Answered
How do i set my range in a variable value
For example, x1=linspace(0,0.2,100); x2=linspace(0.2,0.4,100);

16 days ago | 0

| accepted

Answered
Plot a pixel intensity image
Perhaps with 'jet', imshow('cameraman.tif') colormap jet colorbar

16 days ago | 0

Answered
Appdesigner cannot use the "volshow" or "volumeViewer"? Is there any other way to show 3D voxel?
Attached is a simple 1-button app that invokes volshow() to display the spiral volume from, https://www.mathworks.com/help/imag...

16 days ago | 0

Answered
3D image generation from 3D matrix of data
Perhaps volumeViewer, volshow, or labelvolshow.

17 days ago | 0

Answered
Solve simple equation with the floor function.
It is the same as solving S+delta=P*(1-x) where 0<=delta<1 is arbitrary. The solution is then, x=1-(S+delta)/P It's importa...

17 days ago | 0

| accepted

Answered
Axis resizes inconsistently in a TiledChartLayout when you change its TileSpan
Here is the response from Tech Support: After discussing with my colleagues, I was able to find a solution for the issue you a...

17 days ago | 0

| accepted

Answered
How to avoid a negative solution with fmincon, including an external equation?
You could consider something like this: x0 = [2; 2; 1]; % [x1, x2, f1] A = []; b = []; Aeq = [-10 -2 1]; beq = [-30]; lb =...

17 days ago | 0

Answered
Subtraction of alternate cells in an array
A(3:end)-A(1:end-2)

17 days ago | 0

| accepted

Load more