Answered
How to clear all the connected pixel in order to separate every objects
use *bwconncomp* Here is more info on that: http://www.mathworks.com/help/images/ref/bwconncomp.html

11 years ago | 0

| accepted

Answered
truecolor error in changing RGB of pixels
pic(pic(:,:,2)>1)=1 and pic(pic(:,:,3)>1)=1 These are not doing what you think they should do. The best is to ch...

11 years ago | 1

| accepted

Answered
How to graph the outline of a curve
How does this work for you? load Example [pks,locs]=findpeaks(T,x,'MinPeakDistance',3); plot(x,T); hold on plot...

11 years ago | 0

| accepted

Answered
Is there any more effiecient way to implement this?
scatteredInterpolant is suitable for cases where your source grid is scattered. If you were able to use interp2 it means that yo...

11 years ago | 0

| accepted

Answered
how to plot the data and superimpose the mean of the data?
% Generating some sample data t=linspace(0,2*pi,100); U=sin(t); % Ploting velocity plot(t, U); axis tight ...

11 years ago | 0

| accepted

Answered
Running a function of 2 variables
cr = [0:.1:1]; wn = [0:.1:1]; f=@(cr,wn) sqrt(1-2.*cr.*(1-cos(pi.*wn)).*(1-cr)) amp=bsxfun(f,cr',wn) I think t...

11 years ago | 0

| accepted

Answered
Collision Detection of a Projectile on an Object
Nice project. So you have basically bunch of points and the normal vectors at those vector. I am sure if we go to graphic ...

11 years ago | 0

| accepted

Answered
find the last non-zero column in matrix in pre-allocated matrix
1) if you are looking for las non-zero column why the answer to your example is row 6? 2) if you are looking for last non-zer...

11 years ago | 0

| accepted

Answered
diary, how to create a new one
could you paste the value for *savdir* and *['file_',mfilename,myFolder(53:end),'diary.txt']?* also execute *fullfile(savdir,...

11 years ago | 0

| accepted

Answered
Solving simultaneous equations numerically
Here is what you need to do 1) write a function like this: funX=@(x,y,N,a,q) sum((a-b.*x)./((a-b.*x).^2+q.^2.*y.^2)); ...

11 years ago | 1

| accepted

Answered
finding the coordinates of points with maximum intensity
If "I" is your intensity image and your threshold is stored in "thresh" pretty much all you need to do is: mask= I>Thresh ...

11 years ago | 2

| accepted

Answered
Adding Gaussian noise to a set of points
y = awgn(x,snr) adds Gaussian noise. Perhaps you need to keep SNR bigger. 0.1 is too low.

11 years ago | 0

| accepted

Question


GPU Memory going down
Hi, I have a Mac Book Pro with NVIDIA GeForce GT 750M 2048 MB installed. I noticed that when I am trying to assign a varia...

11 years ago | 1 answer | 2

1

answer

Answered
Need help with Loop coding
So your code to calculate temperature is too long to follow: Here is the general idea. Let's say you can calculate T at da...

11 years ago | 1

| accepted

Answered
How to get the diagonal and a subdiagonal in the same matrix?
A=[ 1 2 3 4; 5 6 7 8; 9 10 11 12; 13 14 15 16] B=triu(A)-triu(A,2) B = 1 ...

11 years ago | 2

| accepted

Answered
how to generate a matrix whose elements are two dimension t random numbers?
You need to either generate rand(100,100,2) or you need to make a cell array of 100x100 where each element is of form [x y] O...

11 years ago | 0

| accepted

Answered
How do you sum the number of boxes in this cell array?
Does this work: sum(cell2mat(boxData(2:3:end)))

11 years ago | 0

| accepted

Answered
how to find the area of a fraction of the matrix with the specific element
Just do this: assuming that A is the matrix that you have its element changing to 1 and you want to see what fraction of this ma...

11 years ago | 1

| accepted

Answered
How to compute area under histogram?
You can do that and manually compute the 80 percentile value or you can use the matlab function Y = prctile(X,p) where X...

11 years ago | 1

| accepted

Answered
How to outline a curve
This could be also helpful http://www.mathworks.com/matlabcentral/fileexchange/38841-matlab-implementation-of-harmonic-anal...

11 years ago | 0

| accepted

Answered
Can any one suggest a reference that describes the contrast limited adaptive histogram equalization technique in details?
[1] Zuiderveld, Karel. "Contrast Limited Adaptive Histograph Equalization." Graphic Gems IV. San Diego: Academic Press Professio...

11 years ago | 0

| accepted

Question


How to stop parfor from launching a parallel pool automatically?
Whenever MATLAB reaches parfor it will try to start a parallel pool and then run the parfor in parallel. How can I stop parfo...

11 years ago | 1 answer | 1

1

answer

Answered
Writing my code in Word and exporting to MATLAB
Don't do that. MATLAB has a nice editor. Inside matlab just type edit mycode.m an editor will open and you can ty...

11 years ago | 0

| accepted

Answered
Edge detection of a nail
reverse your mask (so the big black circle becomes white) then calculate the convex hull of that using (bwconvhull). This gives ...

11 years ago | 0

| accepted

Answered
how to slid filter window of 3*3 over the pixels of image.
use imfilter() it gives you more option than conv2. For the border pixels instead of using zeros (as in conv2 case) you can d...

11 years ago | 0

| accepted

Answered
Finding average at each point
vector=rand(1000,1); halfWindow=1; % 1 since you said one below and one above. You can change this s=ones(2*half...

11 years ago | 1

| accepted

Answered
Save For-loop data to a vector
do this load stormdata.txt S=stormdata; Idx=find( and( S(:,1)>=30 , S(:,2)<=0.5 ) ) Idx would be the list of "...

11 years ago | 1

| accepted

Answered
How can I find the Difference between the Min and Max of all matching cells over different matrices?
so do this Data(:,:,1)=Month1_Data; Data(:,:,2)=Month2_Data; . . . Data(:,:,12)=Month12_Data; then ...

11 years ago | 0

| accepted

Answered
Circle-Circle Intersection ,dimension between circles
I don't know what is your D3. So go to the bottom of the code and set D3 to the one that you have. % Area of a circular s...

11 years ago | 0

| accepted

Answered
Find Column Number in Table
Table variable have property fields you can use that to find the column number like this find(strcmpi(T.Properties.Varia...

11 years ago | 4

| accepted

Load more