답변 있음
how to calculate the area of different labels and remove the labels with smaller area??
CC is a struct including the field |PixelIdxList|. If you define the area as number of pixels, you just need the number of eleme...

대략 9년 전 | 1

| 수락됨

답변 있음
How can I plot Months in x axis in Matlab
You can set the xticklabels: y=rand(1,12); figure, plot(y) set(gca,'xtick',1:12,... 'xticklabel',{'Jan','Feb','Mar','...

대략 9년 전 | 7

답변 있음
need to plot this question
Please... Did you ever write this into the Matlab editor? If so, you would see that the error is in the very first line - you ca...

대략 9년 전 | 0

답변 있음
Why are the variables declared in this WHILE loop not getting modified in the FOR loop?
Check line 11: if (i == (steps+1)) && ((locumx ~= 1) || (locumx ~= 0)) || ((locumy ~= 1) || (locumy ~= 0)) You have 5 c...

대략 9년 전 | 0

답변 있음
how to plot specific row to specific row?
Just transpose it: >> f=[1:10;11:20;21:30]; >> phase=1./f; >> figure, plot(f',phase') If the parameters for the p...

대략 9년 전 | 0

| 수락됨

답변 있음
Matrix, Mean coloum 2, with a value in coloum 1 < 25
just: mean(M(M(:,1)<25,2)) The keyword here is logical indexing, btw. You can find good tutorials about it online.

대략 9년 전 | 1

| 수락됨

답변 있음
How to read txt file in matlab
When I have this issue, I usually go this way: fid=fopen('test.txt'); txt=char(fread(fid)); fclose(fid); headerli...

대략 9년 전 | 0

답변 있음
help regarding indexing matrix in image processing
I think there are dozens of possibilities, I just thought about this particular one: if mod(size(m,1),2)==0 m=[m;n...

대략 9년 전 | 0

| 수락됨

답변 있음
Extract number from a specified row in a text file
If the file size is this small and you don't have too many files to read, you can go with this very simple solution: keywo...

대략 9년 전 | 0

| 수락됨

답변 있음
How to XOR two cells from the same cell array?
With "cell", do you mean you have a cell array or do you refer to the elements of a normal logical array? I suppose second, then...

대략 9년 전 | 0

| 수락됨

답변 있음
Lose of Precision when storing values
What do you mean, you loose precision? I guess you mean the numbers displayed in the command window, such as x=[1e7 1.1] ...

대략 9년 전 | 1

| 수락됨

답변 있음
how to divide a picture into 25 pieces and display in one figure randomly?
One way: img=imread('test.jpg'); %read the image cimg=mat2cell(img(1:5*fix(end/5),1:5*fix(end/5),:),fix(size(img,1)/5)*...

대략 9년 전 | 1

| 수락됨

답변 있음
column shuffling of a matrix
Please use the {}Code button to make your code readable. If this code is sorting the rows in the manner you want, you can ch...

대략 9년 전 | 0

답변 있음
How to represent RGB color information using matlab?
Images are represented by (m x n x 3) arrays. This is basically three two-dimensional arrays behind each other. The first layer ...

대략 9년 전 | 0

답변 있음
Insert a changing number into a variable in matlab?
You can use structure arrays for that: >> day(1).name='Monday'; >> day(1).start=9; >> day(2).name='Tuesday'; >> d...

대략 9년 전 | 0

답변 있음
How to reflect a graph
I guess you want something like this: >> x=1:10;y=x.^2.*rand(size(x)); >> figure, plot(x,y), hold all >> reflectionx=8;...

대략 9년 전 | 0

| 수락됨

답변 있음
How do I populate the next term in an If/elseif code?
Why should it not work to change it to N(i+1)=1? I'm wondering what's the desired output for timeStep between 35 and 40? ...

대략 9년 전 | 0

| 수락됨

답변 있음
What does this syntax/notation mean? En=[En sum(x(n-L+1:n).^2.*win(1:L)')];
|En=[En sum(...)];| is just extending En by one or more elements. Try: >> x=rand x = 0.2061 >> x=[x rand]...

대략 9년 전 | 1

| 수락됨

답변 있음
Why this error using integral function?
Fun thing is I get a different error message: Error using / Matrix dimensions must agree. Anyway, if you chang...

대략 9년 전 | 0

| 수락됨

답변 있음
I have this small code. If statement fails to execute when x(i)<=10^0 say for 10^-5, 10^-1 or 10^0 even though matrix x contains the given elements
For the third time today, the answer is floating point arithmetics: >> [f,ind]=min(abs(x-.01)) f = 1.7347...

대략 9년 전 | 0

| 수락됨

답변 있음
Buttons on top of bitmap?
You might find this contribution useful (if I remember correctly, you can rotate the string by 90°): http://de.mathworks.com...

대략 9년 전 | 0

| 수락됨

답변 있음
find function and vectors gives Empty matrix: 1-by-0
That's a floating point arithmetics problem. 0.1 cannot be represented exactly. Creating the array your way, you get something l...

대략 9년 전 | 2

답변 있음
num2str weird behavior with decimal input....
You already pointed to the correct reason with your comment. It's basically about floating point arithmeticts. >> [0.03*10...

대략 9년 전 | 0

답변 있음
how i read and display the .mha file?
The file mha_read_volume.m must either be in the current directory or be in one of the directories displayed when you enter |pat...

대략 9년 전 | 0

| 수락됨

답변 있음
How to see code of power_fftscope_pr
If you have the m file (power_fftscope_pr.m), you can enter >> type power_fftscope_pr and the code will be printed in th...

대략 9년 전 | 0

답변 있음
plotting x vs y data ?
Sorry, I got a bit confused by the description of the problem. You want to plot this part of the file, right? Year Jan Feb...

대략 9년 전 | 0

답변 있음
How can I extract orientation of arrows from quiver function?
quiver actually _plots_ the information. quiver(x,y,u,v) means arrows are drawn pointing in (u/v) direction and positio...

대략 9년 전 | 0

답변 있음
Resolution of a MATLAB-created JPG
In case you include the information about the resolution, you can get it via imfinfo (see e.g. http://www.mathworks.com/matlabce...

대략 9년 전 | 0

| 수락됨

답변 있음
Exclude matrix diagonal in for loop
In case you cannot vectorize the problem, why don't you simply check for equality? for cnt1 = 1:20 for cnt2=1:20 ...

대략 9년 전 | 0

답변 있음
form a row vector
First, get all the X+... and Y+... separately and get them into the correct order then (Activate the commented % to stop the out...

대략 9년 전 | 1

| 수락됨

더 보기