Réponse apportée
how to interpolate x and y coordinates of contour?
You extract the contours wrong, at least if you have multiple contours at the same level v(i). It is simpler if you plot all the...

plus de 7 ans il y a | 0

| A accepté

Réponse apportée
How to superimpose images, making one of them transparent
Perhaps something like this: B = imread('peppers.png'); % Just to get a sample image subplot(2,2,1) imagesc(B) [i1,j2] = gin...

plus de 7 ans il y a | 0

Réponse apportée
exponential function phase reversal
Try: phi = linspace(-5*pi,5*pi,5*360+1); Phi = angle(exp(1i*phi)); plot(phi,Phi) grid on set(gca,'XTick',[-2.5*360:180:2.5*...

plus de 7 ans il y a | 0

Réponse apportée
Vectorizing nested for loops
You find a nice contribution from J Kirk on the file exchange: Distmat In my historic appreciation efforts there is this Acklam...

plus de 7 ans il y a | 1

Réponse apportée
Parse Error in funtion
Simples, k++ is not valid matlab syntax, sadly according to some, but fact. You'll have to do an excplicit incrementations: ...

plus de 7 ans il y a | 0

| A accepté

Réponse apportée
imwarp large image running out of memory
Maybe you can get weasle your way around the problem by divide-and-conquer? Would it work if you applied your warping on a sub-s...

plus de 7 ans il y a | 0

Réponse apportée
Plot a Contour with no zigzag
If you have access to the spap2 you could try that function, I'd take a stab at converting your contour-data from Cartesian [X,Y...

plus de 7 ans il y a | 0

Réponse apportée
How to perform a truncated SVD
That was an uggly uggly G-matrix. When solving inverse problems the truncation-point is not to be selected close to "at double-p...

plus de 7 ans il y a | 2

| A accepté

Réponse apportée
need help about coherence filter
Have a look at the excellent nonlinear-diffusion-toolbox. It contains functions for coherence-enhancing non-linear diffusion fil...

plus de 7 ans il y a | 0

Réponse apportée
Multiple EEG-files to one spectrogram
If there is time-gaps in your data-sequence, just do the individual spectrograms as per usual, I'd use something like this: dat...

plus de 7 ans il y a | 1

Réponse apportée
Figures with large amounts of data don't export properly to .eps
The solution to avoid this arbitrary choise of output renderer is to explicitly select painters: print('-depsc2','-painters',fi...

plus de 7 ans il y a | 4

| A accepté

Réponse apportée
Saving all the variables from an ode45 Function
It seems your w is a scalar, and you've defined Yi11 and Yi12 as global constants (warnings should come but I'll assume you have...

plus de 7 ans il y a | 0

Réponse apportée
How do I name the trendline in the legend? Also, how can I get the trend line equation on the plot?
Maybe: if c(2) > 0 equation_string = sprintf('%4.3f x + %4.3f',c(1),c(2)); elseif c(2) < 0 equation_string = sprintf('%4...

plus de 7 ans il y a | 0

Réponse apportée
Fitting Lennard-Jones to Morse
First you need to make these potentials comparable - now your LJ12-6 has the dissociation-energy as the zero-level, while your M...

plus de 7 ans il y a | 0

| A accepté

Réponse apportée
How do I ensure that the animation remain within the axis limit?
Well you could achieve that by doing something like: plot(p(1,:),p(2,:),'k.','LineWidth',3,'Markersize',15); axPcurr = axis; ...

plus de 7 ans il y a | 0

| A accepté

Réponse apportée
Plotting coastlines at different levels in a 3D plot
Since you've selected to set zdir to 'reverse' your coastline-plot might look better something like this: z_bottom = max(get(gc...

plus de 7 ans il y a | 1

| A accepté

Réponse apportée
How to view the Frequency content of an image
Try something like: ftI = fft2(I); imagesc(log10(abs(ftI))) caxis([-6 0]+max(caxis)) Then you have the DC-component in the u...

plus de 7 ans il y a | 0

Réponse apportée
How can I call the variables of MATLAB workspace from a function?
I suppose you can build something with the matlab-function evalin, Something like: savename = 'whatever.mat'; savecmd = ['save...

plus de 7 ans il y a | 1

Réponse apportée
legendre function of second kind
You can find a toolbox for special functions on the file exchange: Computation of Special Functions I haven't (or at least don...

plus de 7 ans il y a | 0

Réponse apportée
How do I save every nth Frame of a video and save these images to a folder of my choosing
If you follow the steps from the help on VideoReader, it should be perfectly possible to replace the frame-by-frame reading des...

plus de 7 ans il y a | 0

| A accepté

Réponse apportée
find index values in a 3D matrix above a threshold
To find indices to values larger than 1 do: [i1,i2,i3] = find(A>threshold); After that you might have to loop over the indices...

plus de 7 ans il y a | 0

Réponse apportée
Using ginput with imshow: how to save pixel instead of axis coordinates
Not directly from ginput. You can easily do whatever rounding of the coordinates you've chosen directly after: [x,y] = ginput(2...

plus de 7 ans il y a | 0

| A accepté

Réponse apportée
Adding noise to hyperspectral image (.mat file)
Gaussian blur is just a convolution of your image with a 2-D Gaussian PSF for normal images (for an RGB image it might be slight...

plus de 7 ans il y a | 0

Réponse apportée
How to plot vector time series
Sure you can try speed and wind direction as time-series: subplot(2,1,1) plot(t,atan2(u,v)) subplot(2,1,2) plot(t,(u.^2+v.^2...

plus de 7 ans il y a | 0

| A accepté

Réponse apportée
Acoustic modes in a room, standing wave pattern with nodes and anti-nodes.
Use meshgrid to build 3-D arrays for x y and z: X = 0:0.1:lx; Y = 0:0.1:ly; Z = 0:0.1:lz; [X,Y,Z] = mehsgrid(X,Y,Z); P = A*...

plus de 7 ans il y a | 0

Réponse apportée
Please help me make this function periodic
Write a function for that pulse shape, then have a look at the pulstran function. HTH

plus de 7 ans il y a | 0

Réponse apportée
how to get the inverse of a symmetric matrix and ensure accurancy
If you want an inverse that is nice in that sense you could always simply do an eigenvalue decomposition of F. Then the eigenval...

plus de 7 ans il y a | 0

Réponse apportée
Scanning the Object in Parts and Image Reconstruction
To avoid the having non-illuminated black spots you cant move the light-source the full diameter in the horizontal direction, ti...

plus de 7 ans il y a | 0

| A accepté

Réponse apportée
How to judge polyfit output is correct or not?
Today my crystal ball is very clear (head not) so I see a good answer to this age old question. Since you have a very large n...

plus de 7 ans il y a | 0

| A accepté

Réponse apportée
Saving .mat file with different names
You can use the functional form of save: X = data_of_interest1; Y = data_of_interest2; % and save_name = sprintf('NH_%03d_%0...

plus de 7 ans il y a | 1

Charger plus