Risposto
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

oltre 11 anni fa | 0

| accettato

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

oltre 11 anni fa | 1

| accettato

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

oltre 11 anni fa | 0

| accettato

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

oltre 11 anni fa | 0

| accettato

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

oltre 11 anni fa | 0

| accettato

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

oltre 11 anni fa | 0

| accettato

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

oltre 11 anni fa | 0

| accettato

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

oltre 11 anni fa | 0

| accettato

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

oltre 11 anni fa | 0

| accettato

Risposto
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)); ...

oltre 11 anni fa | 1

| accettato

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

oltre 11 anni fa | 2

| accettato

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

oltre 11 anni fa | 0

| accettato

Domanda


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

oltre 11 anni fa | 1 risposta | 2

1

risposta

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

oltre 11 anni fa | 1

| accettato

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

oltre 11 anni fa | 2

| accettato

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

oltre 11 anni fa | 0

| accettato

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

oltre 11 anni fa | 0

| accettato

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

oltre 11 anni fa | 1

| accettato

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

oltre 11 anni fa | 1

| accettato

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

oltre 11 anni fa | 0

| accettato

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

oltre 11 anni fa | 0

| accettato

Domanda


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

oltre 11 anni fa | 1 risposta | 1

1

risposta

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

oltre 11 anni fa | 0

| accettato

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

oltre 11 anni fa | 0

| accettato

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

oltre 11 anni fa | 0

| accettato

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

oltre 11 anni fa | 1

| accettato

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

oltre 11 anni fa | 1

| accettato

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

oltre 11 anni fa | 0

| accettato

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

oltre 11 anni fa | 0

| accettato

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

oltre 11 anni fa | 4

| accettato

Carica altro