已回答
How to write a loop for this case?
I was also taking the route of putting them into a structure with a fieldname for each month. months = {'Jan','Feb','Mar','Apr'...

5 years 前 | 1

已回答
Image Processing Edge Detection
You could try the following modification. The main thing I did was use bwareafilt to filter out all but the largest area, then f...

5 years 前 | 0

已回答
The output matrix values are either 0 or 1 but i want it between [0,1]
When you load in the image the data type is uint8 - unsigned 8 bit integers. So you can't get values between 0 and 1 unless you ...

5 years 前 | 0

| 已接受

已回答
dot product between system of vectors
Based on your description you can do the following, transpose the Y and then it's a straight forward case of matrix multiplicati...

5 years 前 | 1

已回答
Drawing Polygon shapes with data
You can draw the rectangles from your struct as follows: k = size(out,2); figure(), hold on for i = 1:k a = size(out(i)....

5 years 前 | 0

| 已接受

已回答
How do i check the frequency of an element in a multi level cell array?
The following loads and concatenates all elements of your cell array, including the 1 x 2 string in result2{1,1}(7), into a sing...

5 years 前 | 0

| 已接受

已回答
incorrect input to ezplot function
ezplot requires a function handle as an input whereas you are inputting a vector. Seeing as you have the results as a vector I t...

5 years 前 | 1

已回答
How can I concatenate two vectors?
How can I 'join vector C and signal to get a matrix? Depends on whether signal is a column vector or row vector If it's a co...

5 years 前 | 0

已回答
How to do operations on nested cell array?
This should hopefully work but i ament able to test it myself right now as I'm away from my computer. The idea is to pass onecel...

5 years 前 | 0

已回答
How do i plot maximum values
You weren't actually calling the function. Secondly, the function had no input argument for threshold so I've included that. I a...

5 years 前 | 0

| 已接受

已回答
how can i add column in matrix?
Depends what you want in that column but you could for example add a column of zeros as follows: A = [A zeros(size(A,1),1)]

5 years 前 | 0

| 已接受

提问


How to run checks on all rows of structure?
I want to check all the rows in the field of a structure and find out which rows are not empty. Can I get an index without using...

5 years 前 | 1 个回答 | 0

1

个回答

已回答
Create loop for multiple excel sheets/documents
One approach would be to use a nested structure with the first level down having a fieldname for each of the files, and then eac...

5 years 前 | 0

| 已接受

已回答
Import many excel files to Matlab- How to?
If all your data files are in that folder, and only your data files are in that folder and they are formatted the same, the foll...

5 years 前 | 0

已回答
Counting black pixels in a binary image
Let's say you have a binary image B. You can get the number of black pixels by: numBlack=nnz(~B); and the number of white pixe...

5 years 前 | 1

| 已接受

已回答
Add a variable to table
Hey Sarah, Let's say you have two tables, as follows: T1=table((1:10).',(10:-1:1).'); T2=table((11:20).',(20:-1:11).',(1:10)....

5 years 前 | 0

已回答
how to conver a string to a array or matrix
You can make a 3d matrix with the third dimensions being the same size as your range. You could then generate the results as fol...

5 years 前 | 0

已回答
Is there a way to vectorize the definition of this matrix ?
Here's one way to do it in one line: z = y.*ones(n,m)==(1:n).'.*ones(n,m); I tested with the following inputs: y=1:10; n=5...

5 years 前 | 0

| 已接受

已回答
Intersection volume of two 3d alphashapes
Let's say you have two shapes that were developed as follows using column vectors as inputs: shp1=alphaShape(x1,y1,z1); shp2=a...

5 years 前 | 0

| 已接受

已回答
how to sort an array of elements corresponding to another array in increasing order ?
Have a look at the documentation for sort. You can do it as follows: [b,idx]=sort(b) a=a(idx)

5 years 前 | 2

| 已接受

已回答
Rename field arrays of a structure that hold identical name
I'm guessing your variable is called CCD_Dyad when you load a given .mat file, so given that you have 54 by 54 matrices I would ...

5 years 前 | 0

| 已接受

已回答
Check if input is a 4 element vector
if size(x,2)~=4 || ~isvector(x) || ~isnumeric(x) error('Input must be a row vector of length 4') end

5 years 前 | 0

已回答
video processing for motion detection
So the method I suggested was to look at a single pixel, though you could also look at a few, or the entire image histogram, up ...

5 years 前 | 0

| 已接受

已回答
How to check if a table exists?
If you have a table assigned to the variable T, then I believe you just need to write: if ~exist('T')==1 to check that it does...

5 years 前 | 1

| 已接受

已回答
Intersecting Two Lines with Varying Angle
So I understand you just want to plot two lines where there is a specific angle between them. If we take one line as line y=0, y...

5 years 前 | 0

| 已接受

已回答
Filtering data from a table. How can I save values that are higher that 0.5?
You could get an index for each chunk of data as follows: idx=find(a(:,4)>0.5) idx2=find((idx(2:end)-idx(1:end-1))~=1); idx2=...

5 years 前 | 0

已回答
Map a 2D matrix into 3D using loop for allotment along the 3rd dimension
The best way to deal with that is to use a cell array. I've also just renamed 'end' to 'idxend' and 'i' to 'c' as these are pred...

5 years 前 | 0

| 已接受

已回答
Finding the Sum of a Finite Series
Here I just use some examples for x,y and n, and also instead of 'i' I used 'c' as 'i' is designated for complex numbers. c=1; ...

5 years 前 | 0

已回答
How to rotate surface code
Try the view function (documentation) view(0,0)

5 years 前 | 1

| 已接受

已回答
Segmenting a vector into multiple vectors based on the time stamps
Hey Masahiro, As I understand it, you have a column vector a_Y, and a second vector hit_idx which provides indices for each seg...

5 years 前 | 0

| 已接受

加载更多