Beantwortet
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

fast 10 Jahre vor | 0

| akzeptiert

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

fast 10 Jahre vor | 1

| akzeptiert

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

fast 10 Jahre vor | 0

| akzeptiert

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

fast 10 Jahre vor | 0

| akzeptiert

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

fast 10 Jahre vor | 0

| akzeptiert

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

fast 10 Jahre vor | 0

| akzeptiert

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

fast 10 Jahre vor | 0

| akzeptiert

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

fast 10 Jahre vor | 0

| akzeptiert

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

fast 10 Jahre vor | 0

| akzeptiert

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

fast 10 Jahre vor | 1

| akzeptiert

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

fast 10 Jahre vor | 2

| akzeptiert

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

fast 10 Jahre vor | 0

| akzeptiert

Frage


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

fast 10 Jahre vor | 1 Antwort | 2

1

Antwort

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

fast 10 Jahre vor | 1

| akzeptiert

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

fast 10 Jahre vor | 2

| akzeptiert

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

fast 10 Jahre vor | 0

| akzeptiert

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

fast 10 Jahre vor | 0

| akzeptiert

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

fast 10 Jahre vor | 1

| akzeptiert

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

fast 10 Jahre vor | 1

| akzeptiert

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

fast 10 Jahre vor | 0

| akzeptiert

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

fast 10 Jahre vor | 0

| akzeptiert

Frage


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

fast 10 Jahre vor | 1 Antwort | 1

1

Antwort

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

fast 10 Jahre vor | 0

| akzeptiert

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

fast 10 Jahre vor | 0

| akzeptiert

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

fast 10 Jahre vor | 0

| akzeptiert

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

fast 10 Jahre vor | 1

| akzeptiert

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

fast 10 Jahre vor | 1

| akzeptiert

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

fast 10 Jahre vor | 0

| akzeptiert

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

fast 10 Jahre vor | 0

| akzeptiert

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

fast 10 Jahre vor | 4

| akzeptiert

Mehr laden